Zulip Chat Archive

Stream: Is there code for X?

Topic: Ico_succ_left_eq_erase_Ico


Bolton Bailey (Oct 27 2021 at 00:39):

Is there something like Ico_succ_left_eq_erase_Ico (a b : ℕ) : Ico a.succ b = erase (Ico a b) a?
@Yaël Dillies , I see you have recently been PRs about intervals. Do you have a plan to include something like this?

Yakov Pechersky (Oct 27 2021 at 01:39):

Isn't the proof just { ext, simp }?

Bolton Bailey (Oct 27 2021 at 02:14):

That leaves the goal a.succ ≤ a_1 ∧ a_1 < b ↔ ¬a_1 = a ∧ a ≤ a_1 ∧ a_1 < b

Kevin Buzzard (Oct 27 2021 at 05:59):

Can library_search solve a+1 ≤ t ↔ a ≠ t ∧ a ≤ t? Or prove that either of them are equivalent to a<t? That seems to be the missing piece.

Yaël Dillies (Oct 27 2021 at 07:23):

There might not be! I could have spent tens of PRs completing the finite intervals API but I decided I would wait to see what's needed. If you need it, we can add it.

Yaël Dillies (Oct 27 2021 at 07:24):

You should first prove Ico a.succ b = Ioo a b.

Yakov Pechersky (Oct 27 2021 at 12:28):

The proof for that iff should use the underlying lt lemma present in preorder, likely after an and_comm


Last updated: Dec 20 2023 at 11:08 UTC