Skip to content

Conversation

@t6s
Copy link
Member

@t6s t6s commented Jan 16, 2026

Motivation for this change

fixes #1823

This PR

  1. changes the return type of predicates itv_open_ends, itv_is_ray and itv_is_bd_open
    from Prop to bool for easier use,
  2. renames the latter two to make them correct / concise, and
  3. adds the closed counterpart of them.
Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers

Reference: How to document

Merge policy

As a rule of thumb:

  • PRs with several commits that make sense individually and that
    all compile are preferentially merged into master.
  • PRs with disorganized commits are very likely to be squash-rebased.
Reminder to reviewers

@t6s t6s requested a review from affeldt-aist January 16, 2026 07:03
@t6s t6s marked this pull request as draft January 16, 2026 09:41
@t6s
Copy link
Member Author

t6s commented Jan 16, 2026

Turned into a draft to do some cleaning.

@t6s t6s marked this pull request as ready for review January 16, 2026 10:08
@t6s
Copy link
Member Author

t6s commented Jan 16, 2026

cleaning done


### Renamed
- in set_interval.v
+ `itv_is_ray` -> `itv_is_open_unbounded`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ `itv_is_ray` -> `itv_is_open_unbounded`,
+ `itv_is_ray` -> `itv_is_open_unbounded`

### Renamed
- in set_interval.v
+ `itv_is_ray` -> `itv_is_open_unbounded`,
+ `itv_is_bd_open` -> `itv_is_oo`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ `itv_is_bd_open` -> `itv_is_oo`,
+ `itv_is_bd_open` -> `itv_is_oo`

Definition itv_open_ends (i : interval T) : Prop :=
itv_is_ray i \/ itv_is_bd_open i.
Definition itv_open_ends (i : interval T) : bool :=
(itv_is_open_unbounded i) || (itv_is_oo i).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(itv_is_open_unbounded i) || (itv_is_oo i).
itv_is_open_unbounded i || itv_is_oo i.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can maybe use Implicit Types (i : interval T) and then some of these definitions can fit on one line.

if i is `[_, _] then true else false.

Definition itv_closed_ends (i : interval T) : bool :=
(itv_is_closed_unbounded i) || (itv_is_cc i).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(itv_is_closed_unbounded i) || (itv_is_cc i).
itv_is_closed_unbounded i || itv_is_cc i.

Copy link
Member

@affeldt-aist affeldt-aist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the change of naming is a clarification and using bool improves the scripts.

@affeldt-aist affeldt-aist added this to the 1.16.0 milestone Jan 16, 2026
@affeldt-aist affeldt-aist added the enhancement ✨ This issue/PR is about adding new features enhancing the library label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ This issue/PR is about adding new features enhancing the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

itv_is_ray

2 participants