@@ -7695,29 +7695,16 @@ theorem beqModel_congr [BEq α] [LawfulBEq α] [∀ k, BEq (β k)] {l₁ l₂ l
76957695 (hl : DistinctKeys l₂) (p₁ : l₁.Perm l₃) (p₂ : l₂.Perm l₄) : beqModel l₁ l₂ = beqModel l₃ l₄ := by
76967696 simp only [beqModel, ne_eq, ite_not, Bool.if_false_right, Perm.length_eq p₁, Perm.length_eq p₂]
76977697 suffices h : (l₁.all fun x => getValueCast? x.fst l₂ == some x.snd) = (l₃.all fun x => getValueCast? x.fst l₄ == some x.snd) by simp [h]
7698- conv =>
7699- lhs
7700- rhs
7701- ext x
7702- rw [getValueCast?_of_perm hl p₂]
7703- apply List.Perm.all_eq p₁
7698+ simp [getValueCast?_of_perm hl p₂, List.Perm.all_eq p₁]
77047699
77057700theorem Const.beqModel_congr {β : Type v} [BEq α] [EquivBEq α] [BEq β] {l₁ l₂ l₃ l₄ : List ((_ : α) × β)}
77067701 (hl : DistinctKeys l₂) (p₁ : l₁.Perm l₃) (p₂ : l₂.Perm l₄) : beqModel l₁ l₂ = beqModel l₃ l₄ := by
77077702 simp only [beqModel, ne_eq, ite_not, Bool.if_false_right, Perm.length_eq p₁, Perm.length_eq p₂]
77087703 suffices h : (l₁.all fun x => getValue? x.fst l₂ == some x.snd) = (l₃.all fun x => getValue? x.fst l₄ == some x.snd) by simp [h]
7709- conv =>
7710- lhs
7711- rhs
7712- ext x
7713- rw [getValue?_of_perm hl p₂]
7714- apply List.Perm.all_eq p₁
7704+ simp [getValue?_of_perm hl p₂, List.Perm.all_eq p₁]
77157705
77167706theorem beqModel_eq_constBeqModel {β : Type v} [BEq α] [LawfulBEq α] [BEq β] {l₁ l₂ : List ((_ : α) × β)} : beqModel l₁ l₂ = Const.beqModel l₁ l₂ := by
7717- rw [beqModel, Const.beqModel]
7718- congr
7719- ext x
7720- rw [getValue?_eq_getValueCast?]
7707+ simp [beqModel, Const.beqModel, getValue?_eq_getValueCast?]
77217708
77227709theorem Const.perm_of_beqModel {β : Type v} [BEq α] [LawfulBEq α] [BEq β] [LawfulBEq β] {l₁ l₂ : List ((_ : α) × β)} (hl₁ : DistinctKeys l₁) (hl₂ : DistinctKeys l₂) :
77237710 beqModel l₁ l₂ → l₁.Perm l₂ := by
0 commit comments