@@ -46,6 +46,16 @@ theorem lex_eq_invImage_dfinsupp_lex (r : α → α → Prop) (s : N → N → P
4646instance [LT α] [LT N] : LT (Lex (α →₀ N)) :=
4747 ⟨fun f g ↦ Finsupp.Lex (· < ·) (· < ·) (ofLex f) (ofLex g)⟩
4848
49+ theorem lex_lt_iff [LT α] [LT N] {a b : Lex (α →₀ N)} :
50+ a < b ↔ ∃ i, (∀ j, j < i → ofLex a j = ofLex b j) ∧ ofLex a i < ofLex b i :=
51+ Finsupp.lex_def
52+
53+ theorem lex_lt_iff_of_unique [Preorder α] [LT N] [Unique α] {a b : Lex (α →₀ N)} :
54+ a < b ↔ ofLex a default < ofLex b default := by
55+ simp only [lex_lt_iff, Unique.exists_iff, and_iff_right_iff_imp]
56+ refine fun _ j hj ↦ False.elim (lt_irrefl j ?_)
57+ simpa only [Unique.uniq] using hj
58+
4959theorem lex_lt_of_lt_of_preorder [Preorder N] (r) [IsStrictOrder α r] {x y : α →₀ N} (hlt : x < y) :
5060 ∃ i, (∀ j, r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i :=
5161 DFinsupp.lex_lt_of_lt_of_preorder r (id hlt : x.toDFinsupp < y.toDFinsupp)
@@ -104,6 +114,13 @@ theorem lt_of_forall_lt_of_lt (a b : Lex (α →₀ N)) (i : α) :
104114 (∀ j < i, ofLex a j = ofLex b j) → ofLex a i < ofLex b i → a < b :=
105115 fun h1 h2 ↦ ⟨i, h1, h2⟩
106116
117+ theorem lex_le_iff_of_unique [Unique α] {a b : Lex (α →₀ N)} :
118+ a ≤ b ↔ ofLex a default ≤ ofLex b default := by
119+ simp only [le_iff_eq_or_lt, EmbeddingLike.apply_eq_iff_eq]
120+ apply or_congr _ lex_lt_iff_of_unique
121+ conv_lhs => rw [← toLex_ofLex a, ← toLex_ofLex b, toLex_inj]
122+ simp only [Finsupp.ext_iff, Unique.forall_iff]
123+
107124end NHasZero
108125
109126section Covariants
0 commit comments