Commit 2026-02-21 14:17 378b908c

View on Github →

feat(Order/Interval/Set/Basic): use to_dual (#35162) This PR tags basic theorems about Ioo, Ioc, Ico and Icc with to_dual. This is the other half of #33964. Notes:

  • I decided to add the theorems Ico_subset_Ioo and Icc_subset_Ioc, because they were missing.
  • For some proofs, the cast insertion heuristic failed, and I had to modify the proof slightly in order to make it work with to_dual. The two kinds of fixes were replacing fun ⟨hx₁, hx₁⟩ ↦ with fun hx ↦ and then using hx.1 and hx.2, and inserting an explicit rewrite using mem_Ioo in order to eliminate the defEq abuse. I should investigate how to fix this, but that shouldn't block this PR.
  • There were some theorems that hold by rfl, but their dual does not. This confused the @[defEq] attribute, because we were erroneously setting it for these dual theorems. I've modified it so that it will first check if the attribute is applicable.
  • left_notMem_Ioc and left_notMem_Ioo used to have explicit arguments. I made these implicit which lines up with their dual version, and their Finset counterparts.

Estimated changes

deleted theorem Set.Icc_bot
deleted theorem Set.Icc_diff_Ioc_same
deleted theorem Set.Icc_diff_right
deleted theorem Set.Icc_eq_Ico_same_iff
modified theorem Set.Icc_eq_Ioc_same_iff
modified theorem Set.Icc_eq_Ioo_same_iff
modified theorem Set.Icc_ssubset_Icc_left
deleted theorem Set.Icc_ssubset_Icc_right
modified theorem Set.Icc_subset_Icc
deleted theorem Set.Icc_subset_Icc_right
deleted theorem Set.Icc_subset_Ici_self
deleted theorem Set.Icc_subset_Ico_right
deleted theorem Set.Icc_subset_Iic_iff
modified theorem Set.Icc_subset_Iic_self
deleted theorem Set.Icc_subset_Iio_iff
added theorem Set.Icc_subset_Ioc
modified theorem Set.Icc_subset_Ioo
modified theorem Set.Ici_inter_Iic
modified theorem Set.Ici_inter_Iio
deleted theorem Set.Ico_bot
deleted theorem Set.Ico_eq_Icc_same_iff
deleted theorem Set.Ico_eq_Ioc_same_iff
deleted theorem Set.Ico_eq_Ioo_same_iff
deleted theorem Set.Ico_inter_Ici
deleted theorem Set.Ico_subset_Icc_self
deleted theorem Set.Ico_subset_Ici_self
modified theorem Set.Ico_subset_Ico
deleted theorem Set.Ico_subset_Ico_right
modified theorem Set.Ico_subset_Iio_self
added theorem Set.Ico_subset_Ioo
modified theorem Set.Ico_subset_Ioo_left
deleted theorem Set.Ico_union_right
deleted theorem Set.Iic_inter_Ici
deleted theorem Set.Iic_inter_Ioi
deleted theorem Set.Iio_inter_Ici
deleted theorem Set.Iio_inter_Ioi
deleted theorem Set.Ioc_diff_Ioo_same
deleted theorem Set.Ioc_diff_right
modified theorem Set.Ioc_eq_Icc_same_iff
modified theorem Set.Ioc_eq_Ico_same_iff
modified theorem Set.Ioc_eq_Ioo_same_iff
deleted theorem Set.Ioc_eq_empty
deleted theorem Set.Ioc_eq_empty_iff
deleted theorem Set.Ioc_eq_empty_of_le
deleted theorem Set.Ioc_insert_left
deleted theorem Set.Ioc_ofDual
deleted theorem Set.Ioc_self
modified theorem Set.Ioc_subset_Icc_self
modified theorem Set.Ioc_subset_Iic_self
deleted theorem Set.Ioc_subset_Ioc
deleted theorem Set.Ioc_subset_Ioc_right
deleted theorem Set.Ioc_subset_Ioi_self
deleted theorem Set.Ioc_subset_Ioo_right
deleted theorem Set.Ioc_toDual
modified theorem Set.Ioi_inter_Iic
modified theorem Set.Ioi_inter_Iio
modified theorem Set.Ioo_eq_Icc_same_iff
deleted theorem Set.Ioo_eq_Ico_same_iff
modified theorem Set.Ioo_eq_Ioc_same_iff
deleted theorem Set.Ioo_insert_right
modified theorem Set.Ioo_subset_Ico_self
modified theorem Set.Ioo_subset_Iio_self
deleted theorem Set.Ioo_subset_Ioc_self
deleted theorem Set.Ioo_subset_Ioi_self
modified theorem Set.Ioo_subset_Ioo
deleted theorem Set.Ioo_subset_Ioo_right
deleted theorem Set.Ioo_union_right
modified theorem Set.left_mem_Icc
modified theorem Set.left_mem_Ico
modified theorem Set.left_notMem_Ioc
modified theorem Set.left_notMem_Ioo
deleted theorem Set.mem_Icc_of_Ico
modified theorem Set.mem_Icc_of_Ioc
modified theorem Set.mem_Icc_of_Ioo
deleted theorem Set.mem_Ici_of_Ioi
modified theorem Set.mem_Ico_of_Ioo
modified theorem Set.mem_Iic_of_Iio
deleted theorem Set.mem_Ioc_of_Ioo
deleted theorem Set.nonempty_Ico_subtype
deleted theorem Set.nonempty_Ioc
deleted theorem Set.notMem_Icc_of_gt
deleted theorem Set.notMem_Ico_of_ge
deleted theorem Set.notMem_Ioc_of_gt
deleted theorem Set.notMem_Ioo_of_ge
deleted theorem Set.right_mem_Icc
deleted theorem Set.right_mem_Ioc
deleted theorem Set.right_notMem_Ico
deleted theorem Set.right_notMem_Ioo
modified theorem Set.subsingleton_Icc_iff