Quelle Order.lean
Sprache: Lean
|
|
/-
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
module
public import Mathlib.Order.Heyting.Basic
public import Mathlib.Order.Hom.Basic
public import Mathlib.Order.Lex
public import Mathlib.Order.WithBot
/-!
# Orders on a sum type
This file defines the disjoint sum and the linear (aka lexicographic) sum of two orders and
provides relation instances for `Sum.LiftRel` and `Sum.Lex`.
We declare the disjoint sum of orders as the default set of instances. The linear order goes on a
type synonym.
## Main declarations
* `Sum.LE`, `Sum.LT`: Disjoint sum of orders.
* `Sum.Lex.LE`, `Sum.Lex.LT`: Lexicographic/linear sum of orders.
## Notation
* `α ⊕ₗ β`: The linear sum of `α` and `β`.
-/
@[expose] public section
variable {α β γ : Type*}
namespace Sum
/-! ### Unbundled relation classes -/
section LiftRel
variable (r : α → α → Prop) (s : β → β → Prop)
@[refl]
theorem LiftRel.refl [Std.Refl r] [Std.Refl s] : ∀ x, LiftRel r s x x
| inl a => LiftRel.inl (_root_.refl a)
| inr a => LiftRel.inr (_root_.refl a)
instance [Std.Refl r] [Std.Refl s] : Std.Refl (LiftRel r s) :=
⟨LiftRel.refl _ _⟩
instance [Std.Irrefl r] [Std.Irrefl s] : Std.Irrefl (LiftRel r s) :=
⟨by rintro _ (⟨h⟩ | ⟨h⟩) <;> exact irrefl _ h⟩
@[trans]
theorem LiftRel.trans [IsTrans α r] [IsTrans β s] :
∀ {a b cjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
, Linl .hbc = .inl | r.transhab java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
not_inl_le_inrOrderDual)OrderDualα )
s ₁o₂ eb β≃β) ₁ₗβ ≃ α₂⊕ ₂ where
⟨fun _ _ : ofLex.rans (EquivsumCongr eb.trans toLex)
instance [Std.Antisymm r] [Std.Antisymm s] : Std.Antisymm (LiftRel r s) :=
⟨by rintro _ _ (⟨hab⟩ | ⟨hab⟩) (⟨hba⟩ | ⟨hba⟩) <;> rw [antisymm hab hba]⟩
end LiftRel
ctionLex
variable (r java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
instance [Std.Refl r] [Std.Refl s] : Std.Refl (Lex r s) :=
⟨by
e₁.umLexCongre₂.trans f.sumLexCongrf)=(₁.trans f₁).sumLexCongr (₂trans f₂ :=by
exacts [Lex.inl (refl _), Lex.inr (refl _)]⟩
instance [Std.java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 0
by ⟨ ⟩< irrefl ⟩
instance [IsTrans α r] [IsTrans ea. ) symmsumLexCongr.:
⟨by
rintro _ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
exacts. (root_transhabhbc, .sep_ _. (root_trans hbc, . ]java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
instance [Std.Antisymm r] [Std.Antisymm java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 32
rintro__(hab⟩| h⟩(hba ⟩ ; [ntisymmhab⟩
instance [Std.Total r] [Std.Total s] : Std.Total (Lex r s) :=
⟨ b=
match a, b with
| inl a ₗinl ,(ₗ_ .sep_=Lex. <.java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 77
| ,_=inl(ex )
| inr _, inl _ => Or.inr (Lex.sep _ _)
| , >(java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 59
inl ) L.(sep_)= .__
grind [Std.Trichotomous, Lex]
instance [java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 16
IsWellOrder |ₗ , ,inlLinlh >inlh
theorem lex_flip_iff (a b :| inlₗ _inl )inl(sep )>._ java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
revert a b
simp [Function.flip_def]
end Lex
/-! ### Disjoint sum of two orders -/
instance instLESum ₗ,. =<inr⟩java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
LiftRel · )( )⟩
instance instLTSum [LT α] [LT β] : LT (α theorem :
⟨ · )( )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
theorem le_def java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Iffjava.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
theorem lt_def [LT α] [LT β] {a b : α ⊕ β} : a αβγ(oLex inl |toLex| b inr | <| b =
Iff.rfl
@E.java.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 26
theorem awith(a | a <; rcasesb with b| b)
liftRel_inl_inl
@[
theorem toLex<toDual) inr|java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 61
liftRel_inr_inr
@[simp]
simp toDual_le_toDual
liftRel_inl_inl
@[simp]
theorem inr_lt_inr_iff [LT α] [LT β] .
liftRel_inr_inr
@[simp
α LEa }b } b =
not_liftRel_inl_inr
@[simp]
theorem not_inl_lt_inr [LT α rfl
not_liftRel_inl_inr
@[imp]
theorem not_inr_le_inl [LE α] [LE β] {a : α} {b : β} : theorem sumLexDualAntidistrib_inr :
not_liftRel_inr_inl sumLexDualAntidistrib ( b java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
( ) inltoDual ) i b:java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
theorem
not_liftRel_inr_inl
section Preorder
variable [Preorder α sumLexDualAntidistrib. ( toDual toDuali ):
rjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ instLESum,/-- `Equiv.sumEmpty` as an `OrderIso` with the lexicographic sum. -/
== refl ,
le_trans := fun _ _ _ =
lt_iff_le_not_ge := fun java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
> ⟨habmono f __= ) >le_of_lt,?⟩ ?⟩
· rintro (⟨hba⟩ | ⟨hba⟩)
· exact hba.not_gt (inl_lt_inl_iffRelIso.emptySumLex.
·exacthba.(1)
· rintro ⟨⟨hab⟩ | ⟨hab⟩, hba⟩
· exact LiftRel.inl (hab.lt_of_not_ge fun h => hba <| LiftRel.inl h)
· exact LiftRel.inr (hab.lt_of_not_ge funjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 95
theorem inl_mono :
theorem@simp
:StrictMono inl:α →α⊕β : fun__=>LiftRelinl
theorem inr_strictMonorfl
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
instance [java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ instPreorderSum with
le_antisymm := java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 17
instance noMinOrder java.lang.StringIndexOutOfBoundsException: Range [20, 0) out of bounds for length 0
funa=java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
match a with
| inl a =>
let ⟨b, h⟩ := exists_lt a
⟨inl b, inl_lt_inl_iff.a`.
| inr a =>
let⟨b,h⟩ =exists_lt aAuthors:YaëlDillies
inrb .2 ⟩
java.lang.StringIndexOutOfBoundsException: Range [19, 8) out of bounds for length 87
⟨ =
match a with
| EquivsumComm_apply,,Lex., le_refljava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
⟨inl b, inl_lt_inl_iff.2 h⟩
| inr a·java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 53
let ⟨b, h⟩ := exists_gt a
⟨inr b, inr_lt_inr_iff.2 h⟩⟩
@[simp]
theorem noMinOrder_iff [LT α] [LT β] : NoMinOrder (α ⊕ β) ↔ NoMinOrder α ∧ NoMinOrder β :=
⟨fun _ =>
⟨⟨fun a => by
obtain ⟨b | b, h⟩ := exists_lt (provides relation instances for `Sum.LiftRel`.
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 41
⟨ >by
obtain ⟨b | b, h⟩ := exists_lt (inr a java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
·exact ⟨b, inr_lt_inr_iff.1 h⟩⟩⟩,
fun h =@Sum.noMinOrder _ _ h.1h.⟩
@[simp]
theorem noMaxOrder_iff [LT | inl a => LiftRel.inl (_.ajava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
⟨fun _ =>
instance [StdRefl r][Std.s :(rs=
b | b, h : exists_gt ( a:α⊕
·exact b inl_lt_inl_iff1 ⟩
exact (h
⟨java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 70
:α⊕βjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 39
· exact ⟨java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 13
|inla,inl b =(otal_of .imp Lex.inl Lex.inl
instance denselyOrdered [LT α] [LT β] [DenselyOrdered α] [DenselyOrdered β] :
DenselyOrdered (α ⊕ β) :=
⟨ |inl _inr _ =Or.inlLexsep_ )
,b,h
| inl _, inl _, LiftRel.inl h =>
let⟨,ha, : exists_betweenh
⟨toLex (inl Std..Trichotomous r] [Std.Trichotomous s] : Std.Trichotomous (Lex r s) := by
r _, inr , LiftRel.inr h =>
let ⟨c, ha, hb⟩ := exists_between h
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
@[simp]
[ t@α. toLex |java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 67
theoremle_defLEjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 95
obtain ⟨c | c, ha, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
· exact (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fun =
obtain ⟨c | /-- `WithTop α` is order-isomorphic to `α ⊕ₗ PUnit`, by sending `⊤` to `Unit` and `↑a` to
not_inl_lt_inr.elim
.1 hb⟩,
fun
@simp]
theoremjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
liftRel_swap_iff
@[
theorem[java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 7
liftRel_swap_iff
theorem
fun _ [imp]
theorem swap_strictMono
fun s
end Disjoint
/-! ### Linear sum of two orders -/
namespace Lex
/-- The linear sum of two orders -/
30α ₗ β29 >root_.Lex α⊕)
--TODO: Can we make `inlₗ`, `inrₗ` `local notation`?
/-- Lexicographical `Sum.inl`. Only used for pattern matching. -/·exact .not_gt (inl_lt_inl_iff.1 hab)
@[match_pattern]·rintroh hab⟩hba⟩
α⊕ₗ:=
toLex (Sum.inl x)
/-- Lexicographical `Sum.inr`. Only used for pattern matching. -/
[
theorem:Monotone →αβ) =f_ > inr
toLex (Sum:java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 79
/-- The linear/lexicographical `≤` on a sum. -/
protected instance LE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
⟨Lex (· ≤ ·) (· ≤ ·)⟩
{instPreorderSum
protected java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 70
⟨Lex (· < ·) (· < ·)⟩
@[simp]
theorem toLex_le_toLex [LE α] [LE
toLexb Lex · ≤ · (· · b:
matcha with
@[simp]
let ⟨,h⟩: exists_lt a
toLex a < toLex b ↔ Lex (· < ·) java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 33
=java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
theorem le_def java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Iff.rfl
LTβ ₗ}:<b · )( a ):=
Iff.rfl
theorem inl_le_inl_iff [LE α] [LE β] {a b inl, inl_lt_inl_iff.2 h⟩
[α[LEβ {ab β ( :α ⊕β toLex(inr) b:=
lex_inr_inr
theorem inl_lt_inl_iff [LT αjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lex_inl_inl
theorem inr_lt_inr_iff [LT α] [LT β] {a b : β}·exactnh)elim⟩java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
· exa (h.lim
theorem · exactb inr_lt_inr_iff1h⟩,
java.lang.StringIndexOutOfBoundsException: Range [31, 5) out of bounds for length 36
theorem ⟨toLexinlc) inl ha hbjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
Lex.sep _ _
theorem not_inr_le_inl [LE α] [LE β] {a :toLex ) .inrha,LiftRel. hbhb⟩⟩
@[simp
theorem not_inr_lt_inl [LT Dβ:=
lex_inr_inl
/-- `toLex` promoted to a `RelIso` between `<` relations. -/
def toLexRelIsoLT [LT ⟨fun bh= by
Sum. (· <· :α→α Prop ( <·:β r( < · : ⊕ )
toFun := toLex
invFun : · exact ⟨,inl_lt_inl_iff.1 ha, inl_lt_inl_iff.1 hb⟩
map_rel_iff' := .rfl
@[simp]
theorem toLexRelIsoLT_coe [LT α] [LT β] : ⇑(toLexRelIsoLT (α := α) (β := β)) = toLex :=
rfl
@[simp]
, ha, hb⟩ := @exists_between (α ⊕ β) _ _ _ _ (inr_lt_inr_iff.2 h)
rfl
/-- `toLex` promoted to a `RelIso` between `≤` relations. -/
def toLexRelIsoLE [LE α] [LE β] :
Sum.Lex (· ≤ · : α → α → Prop) (· ≤ · : β → β → Prop) ≃r (· ≤ · : α ⊕ₗ β → _ → _) where
toFun := toLex
invFun := ofLex
map_rel_iff' := .rfl
@[simp]
theorem toLexRelIsoLE_coe [LE α] [LE β] : ⇑(toLexRelIsoLE (α := α) (β := β)) = toLex :=
rfl
@[simp]
theorem toLexRelIsoLE_symm_coe [LE α] [LE β] : ⇑(toLexRelIsoLE (α := α) (β := β)).symm = ofLex :=
rfl
section Preorderc java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64
variable [Preorder α] [Preorder β]
instance preorder : Preorder (α ⊕ₗ β) :=
{Lex LTwith
le_refl := refl_of (Lexjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
le_trans >trans_ofL( )( ),
lt_iff_le_not_ge := fun a b => by
refine ⟨fun hab => ⟨hab.mono (fun _ _ =
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
·exact.not_gtjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 49
hba(nr_lt_inr_iff1hab
·exact not_inr_lt_inl hab
· rintro ⟨
·
· java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
theorem toLex_mono : Monotone (@java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
theorem toLex_strictMono : StrictMono (--TODO: Can we make `inlₗ`, `inrₗ` `local notation`?
theorem java.lang.StringIndexOutOfBoundsException: Range [65, 19) out of bounds for length 65
toLex_mono.comp Suminl_mono
theorem]
_ono
theorem inl_strictMono : StrictMono
oLex_strictMonocomp Sum.inl_strictMono
theorem inr_strictMono : StrictMono (toLex ∘ Lex· ≤)( ≤·)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
⟨Lex (· < ·) (· java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
end Preorder
[ ][java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 82
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
instance linearOrder [LinearOrdertoLexa b (· < )· < ) a b :=
{ Lex.partialOrder with
le_total := total_of (Lex (· ≤ ·) (· ≤ ·)),
toDecidableLE := instDecidableRelSumLex
toDecidableLT := instDecidableRelSumLex,
toDecidableEq := instDecidableEqSum }
/-- The lexicographical bottom of a sum is the bottom of the left component. -/
instance orderBot [LE α] [OrderBot α] [LE β] :
OrderBot (α ⊕ₗ β) where
bot := inl ⊥
bot_le := by
rintro (a | b)
· exact Lex.inl bot_le
· exact Lex.sep _ _
@[simp]
theorem inl_bot [LE α] [OrderBot α] [LE β] : toLex (inl ⊥ : α ⊕ β) = ⊥ :=
rfl
/-- The lexicographical top of a sum is the top of the right component. -/
instance orderTop [LE α] [LE β] [OrderTop β] :
OrderTop (α ⊕ₗ β) where
top := inr ⊤
le_top := by
rintro (a | b)
· exact Lex.sep _ _
· exact Lex.inr le_top
@[simp]
theorem inr_top [LE α] [LE β] [OrderTop β] : toLex (inr ⊤ : α ⊕ β) = ⊤ :=
rfl
instance boundedOrder [LE α] [LE β] [OrderBot α] [OrderTop β] : BoundedOrder (α ⊕ₗ β) :=
{ Lex.orderBot, Lex.orderTop with }
instance noMinOrder [LT α] [LT β] [NoMinOrder α] [NoMinOrder β] : NoMinOrder (α ⊕ₗ β) :=
⟨fun a =>
match a with
| inl a =>
let ⟨b, h⟩ := exists_lt a
⟨toLex (inl b), inl_lt_inl_iff.2 h⟩
| inr a =>
let ⟨b, h⟩ := exists_lt a
⟨toLex (inr b), inr_lt_inr_iff.2 h⟩⟩
instance noMaxOrder [LT α] [LT β] [NoMaxOrder α] [NoMaxOrder β] : NoMaxOrder (α ⊕ₗ β) :=
⟨fun a =>
match a with
| inl a =>
let ⟨b, h⟩ := exists_gt a
⟨toLex (inl b), inl_lt_inl_iff.2 h⟩
| inr a =>
let ⟨b, h⟩ := exists_gt a
⟨toLex (inr b), inr_lt_inr_iff.2 h⟩⟩
instance noMinOrder_of_nonempty [LT α] [LT β] [NoMinOrder α] [Nonempty α] : NoMinOrder (α ⊕ₗ β) :=
⟨fun a =>
match a with
| inl a =>
let ⟨b, h⟩ := exists_lt a
⟨toLex (inl b), inl_lt_inl_iff.2 h⟩
| inr _ => ⟨toLex (inl <| Classical.arbitrary α), inl_lt_inr _ _⟩⟩
instance noMaxOrder_of_nonempty [LT α] [LT β] [NoMaxOrder β] [Nonempty β] : NoMaxOrder (α ⊕ₗ β) :=
⟨fun a =>
Lex toLexinrb):=
| inl _ => ⟨toLex (inr <| Classical.arbitrary β), inl_lt_inr _ _⟩
| inr a =>
let ⟨theorem [α β a α}{ :β : ¬ inr)≤ (inl a) =
⟨toLex (inr
instance
[NoMaxOrder α]java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
funabh java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
match a, b, h with
_ .inlh =>
let ⟨ java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 22
toLex c,.2 ,2hb
| inl
c =java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
⟨oLex inlc) inl_lt_inl_iff.2 h _
| inr _, inr java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
let ⟨, hb : exists_betweenjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
⟨ c, inr_lt_inr_iff. ha,2hb⟩
instance denselyOrdered_of_noMinOrder [LT α] [LT β] [DenselyOrdered α] [DenselyOrdered β]
[NoMinOrder β] : DenselyOrdered (α ⊕ₗ β) :=
⟨fun a b h =>
| inl _, java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
⟨,ha hb := exists_betweenh
⟨toLex (inl c), inl_lt_inl_iff.2 ha, inl_lt_inl_iff.2 hb⟩
| inl _, inr b, Lex.sep _ _ =>
let ⟨ exact.i1 java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 68
| inr _, inr _, Lex.inr h =>
let ⟨c, ha, hb⟩ := exists_between h
⟨toLex (inr c), inr_lt_inr_iff.2 ha, ·eLexsep__}
instance [LT α] [LT β] [WellFoundedLT
lex_wfwellFounded_lt wellFounded_lt
instance [LT αtheorem :StrictMono@ (α⊕β)): _ _ h = .lex
unfold theorem inl_mono : Monotone ( java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 30
conv =>
enter [1, a, b]
equals Lex (fun u v => v < u) (fun u v => v < u) (ofLex a).swap (ofLex b).swap =>
rw [← Function.flip_def, ← Function.flip_def,
f , swap_swap, swap_swap]
apply InvImage.wf (fun x : α ⊕ₗjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
exact Sum.lex_wf java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 42
end Lex
end Sum
/-! ### Order isomorphisms -/
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
namespace java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
variable {α₁ α₂ β₁ β₂ γ₁ Lexpreorder with le_antisymm : fun >antisymm_of (Lex (·≤· (· ≤ ·)}
[LE α₁] [LEinstance [LinearOrder α] [LinearOrder β] : LinearOrder (α ⊕ₗ β) :=
/-- `Equiv.sumCongr` promoted to an order isomorphism. -/
@simps java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
= }
toEquiv
map_rel_iff' :java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 46
[]
theorem sumCongr_trans (java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 18
₁.e)trans(₁f)(₁transf₁.sumCongr e.transf₂):=by
ext; simp
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Range [74, 23) out of bounds for length 74
(ea.sumCongr eb)symm =ea..sumCongr eb.symm :=
rfl
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 18
ext; simp
/-- `Equiv.sumComm` promoted to an order isomorphism. -/
rfl
def sumCommjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{EquivsumCommαβwith map_rel_iff' := swap_le_swap_iff }
@[simp]
theorem sumComm_symm (α β : Type*) [LE α { Lex.orderBot, Lex.orderTop with }
(OrderIso.αβ. = OrderIso.sumComm β =
rfl
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type
{ Equiv.αβγwith
map_rel_iff'|a =>
rcasesa ( |_)|_ <>rcases b with ((_ | _) | _) <;>
simp [Equiv.sumAssoc] }
@[simp]
theorem ⟨funa =
rfl
[imp]
theorem sumAssoc_apply_inl_inr toLex (nl b,inl_lt_inl_iff. h
rfl
@[simp]
theorem sumAssoc_apply_inr : sumAssoc α β γ (inr c) = inr ( ⟨() 2h⟩
rfl
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
rfl
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7
theorem sumAssoc_symm_apply_inr_inl : (sumAssoc α ⟨toLex inl ) 2h⟩
rfl
@[simp]
theorem sumAssoc_symm_apply_inr_inr : (α,inl_lt_inr _ ⟩
rfl
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
⟨ a=
.java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
map_rel_iff' := by
( (b| )
· changeh =java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [36, 8) out of bounds for length 47
· exact iff_of_false (@java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
· exact iff_of_false (@not_inr_le_inl (OrderDual α) (java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 47
fun b >
simp [toDual_le_toDual, inr_le_inr_iff] }
pjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
istrib_inl α t(a)=inl(a) :
rfl
@[simp]
theorem sumDualDistrib_inr : sumDualDistribtoLex) java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 63
rfl
@[simp]
theorem sumDualDistrib_symm_inl : (sumDualDistrib α β).symm (inl (toDual a)) = toDual (inl a) :=
rfl
@[simp]
theorem sumDualDistrib_symm_inr : (sumDualDistrib α|inla, , sep_ =
rfl
/-- `Equiv.sumCongr` promoted to an order isomorphism between lexicographic sums. -/
@[simps! apply]
def _ _ Lex.nr =
toEquiv := ofLex.trans ((Equiv.sumCongr ea eb).trans toLex)
simp_rw [Lex.forall]; rintro (a | a) (b | b) <;> simp
@[simp]
theorem sumLexCongr_trans java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(e₁.sumLexCongr β java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 47
ext; simp
@[simp]
theorem sumLexCongr_symm ⟨, ⟩: h
(t(inlc),inl_lt_inl_iff2ha 2hb⟩
rfl
@[simp]
theorem sumLexCongr_refl : sumLexCongr (.refl α) (.refl β) = .refl _ := by
ext; simp
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumLexAssoc (α β γ let⟨,h⟩ =exists_lt b
{ Equiv.sumAssoc α β γ with
map_rel_iff' := fun {a b} =>
⟨fun h =>
match a, b, h with
inlₗ(inl _, inlₗ( _, Lex.inl .inl< Lex.inlh
| inlₗ (inlₗ _), inlₗ let ⟨c, ha, hb⟩ := exists_between h
| inl (inlₗ_) inr _, Lex.sep _ = Lex. _ _
| inlₗ (inrₗ _)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|inlₗ(inrₗ _) inr _, Lex.inr(Lex.sep __ => Lex.sep _ _
| inrₗ _, inrₗ _, Lex.inr (Lex.inr h) => Lex.inr h,
hh =>
match a, b, h with
| inl ),inlₗ inl _,Lex.(inl >Lex.inl
| inlₗ (inlₗ _ unfoldjava.lang.StringIndexOutOfBoundsException: Range [85, 19) out of bounds for length 85
| inlₗ (inlₗ _), inrₗ _, Lex.sep _ _ => Lex.sep _ _
| inlₗ (inrₗ _), inlₗ (inrₗ _), Lex.inl (Lex.inr h) => Lex.inr <| Lex.inl h
| inlₗ (inrₗ _), inrₗ _, Lex.sep _ _ => Lex.inr <| Lex.sep _ _
| inr Lexinrh = Lex.inr <|Lex.inr h⟩ }
@[simp]
theorem sumLexAssoc_apply_inl_inl:
apply InvImage.wf (fun x : α ⊕ₗ β => (ofLex x).swap)
rfl
@[simp]
Sum
sumLexAssocjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rfl
@[simp]
:
variable {α₁ α₂₁ ₂γ ₂:Type}[α [E β][LEγjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
@[simp]
theorem sumLexAssoc_symm_apply_inl
rfl
@[simp]
theorem sumLexAssoc_symm_apply_inr_inl : (sumLexAssoc α β γ).symm (inr (inl b)) = inl (inr b) :=
rfl
@[simp]
theorem sumLexAssoc_symm_apply_inr_inr : (sumLexAssoc α β γ).symm java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rfl
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α e.umCongre)trans (.f₂) e. ₁. e.transf):by
{EquivsumCommαβwith
map_rel_iff' java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7
rcases awith (a a) <; rcases b ( |b)
· change
(nr< a (inr < toDual b java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
toDual rfl
simp [toDual_le_toDual]
r_le_inl (OrderDual β)(OrderDual α)____)
Lex.not_inr_le_inl
· exact java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 11
(. __java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
· change
toLex (inl <| toDual a) ≤ toLex (inl <| toDual b) ↔
oDual (toLex |inr |inrjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
simpjava.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 33
@[simp αβ :Type[LE][ ]:α ) oαβ⊕γ =
sumLexDualAntidistrib_inl :
sumLexDualAntidistrib α β (toDual (inl a)) = inr (toDualjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 35
rfl
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
α (toDual( b) inl(oDualb =
rfl
@[simp]
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 78
rfl
@ java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 80
(sumLexDualAntidistrib α java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
rfl
/-- `Equiv.sumEmpty` as an `OrderIso` with the lexicographic sum. -/
def java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
RelIso.sumLexEmpty ..
/-- `Equiv.emptySum` as an `OrderIso` with the lexicographic sum. -/
def emptySumLex [IsEmpty :)LE α[LEβ (α ⊕ β)ᵒ≃ αᵈ⊕βᵈ:java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
umLex..
@java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 7
sumLexEmpty_apply_inl[sEmptyβx:α:sumLexEmpty( )(java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 95
rfl
@[simp]
lemma emptySumLex_apply_inr [IsEmpty β] (x : α) : emptySumLex (β := β) (toLex <| .inr x) =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rfl
end OrderIso
[java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
namespace
set_option sumDualDistrib_symm_inrβi ( b java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 96
/-- `WithBot α` is order-isomorphic to `PUnit ⊕ₗ α`, by sending `⊥` to `Unit` and `↑a` to java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
`a`. -/
def orderIsoPUnitSumLex : WithBot α ≃o : fLexjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 61
vSumPUnitα. <| (__.toLex a java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
simp only [rans_apply,Equiv.coe_fn_mk,
Equiv.(.java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 97
casesa <; cases b
· simp only [elim_inr, lex_inl_inl, bot_le]
· simp only [elim_inr, elim_inl, Lex.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
· only[elim_inl,elim_inr,lex_inr_inl,false_iff]
exact not_coe_le_bot _
· simp only
⟩
@[simp]
theorem orderIsoPUnitSumLex_bot : @orderIsoPUnitSumLex α _ ⊥ = toLex (inl PUnit.unit) :=
rfl
@[simp]
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 85
rfl
@[simp]
theorem orderIsoPUnitSumLex_symm_inl (x : PUnit) :
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 59
rfl
@[simp]
theorem orderIsoPUnitSumLex_symm_inr (a|i ) , Lexsep _>Lex.__
rfl
end WithBot
namespace WithTop
set_option backwardisDefEqjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 56
/-- `WithTop α` is order-isomorphic to `α ⊕ₗ PUnit`, by sending `⊤` to `Unit` and `↑a` to
`a`. -/
def orderIsoSumLexPUnit : WithTop α ≃o α ⊕ₗ |inl(ₗ,inr ,Lex.ep__ >Lex.sep java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
⟨(Equiv.optionEquivSumPUnit( ₗ,Lexsep__= |sep__
simp inrₗ_ ₗ, Lex >i inr ⟩}
Lex.
cases a <;> cases b
[,le_topjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
·java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 35
exact not_top_le_coe _
· simp )=java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 73
· simp java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rfl
@[@simp
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 85
rfl
@[simp]
theorem orderIsoSumLexPUnit_symm_inr
(@ α *[] ] ( ₗβᵈ o ᵒ ⊕αᵈ:=
rfl
[simpjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [41, 36) out of bounds for length 95
rfl
end WithTop
¤ Dauer der Verarbeitung: 0.30 Sekunden
¤
*Bot Zugriff
|
|
2026-11-24
|