l3lab/ntp-mathlib huggingface dataset:
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type*) [LE α] [LE β] [LE γ] : Sum (Sum α β) γ ≃o Sum α (Sum β γ) :=
  { Equiv.sumAssoc α β γ with
    map_rel_iff' := @fun a b => by
      rcases a with ((_ | _) | _) <;> rcases b with ((_ | _) | _) <;>
      

Proof state:
case inl.inr.inl.inr
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁵ : LE α✝
inst✝⁴ : LE β✝
inst✝³ : LE γ✝
a : α✝
b : β✝
c : γ✝
α : Type u_5
β : Type u_6
γ : Type u_7
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
src✝ : (α ⊕ β) ⊕ γ ≃ α ⊕ β ⊕ γ := Equiv.sumAssoc α β γ
val✝¹ val✝ : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl (inr val✝¹)) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl (inr val✝)) ↔
    inl (inr val✝¹) ≤ inl (inr val✝)

Next tactic:
simp [Equiv.sumAssoc]
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type*) [LE α] [LE β] [LE γ] : Sum (Sum α β) γ ≃o Sum α (Sum β γ) :=
  { Equiv.sumAssoc α β γ with
    map_rel_iff' := @fun a b => by
      rcases a with ((_ | _) | _) <;> rcases b with ((_ | _) | _) <;>
      

Proof state:
case inl.inr.inr
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁵ : LE α✝
inst✝⁴ : LE β✝
inst✝³ : LE γ✝
a : α✝
b : β✝
c : γ✝
α : Type u_5
β : Type u_6
γ : Type u_7
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
src✝ : (α ⊕ β) ⊕ γ ≃ α ⊕ β ⊕ γ := Equiv.sumAssoc α β γ
val✝¹ : β
val✝ : γ
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl (inr val✝¹)) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr val✝) ↔
    inl (inr val✝¹) ≤ inr val✝

Next tactic:
simp [Equiv.sumAssoc]
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type*) [LE α] [LE β] [LE γ] : Sum (Sum α β) γ ≃o Sum α (Sum β γ) :=
  { Equiv.sumAssoc α β γ with
    map_rel_iff' := @fun a b => by
      rcases a with ((_ | _) | _) <;> rcases b with ((_ | _) | _) <;>
      

Proof state:
case inr.inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁵ : LE α✝
inst✝⁴ : LE β✝
inst✝³ : LE γ✝
a : α✝
b : β✝
c : γ✝
α : Type u_5
β : Type u_6
γ : Type u_7
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
src✝ : (α ⊕ β) ⊕ γ ≃ α ⊕ β ⊕ γ := Equiv.sumAssoc α β γ
val✝¹ : γ
val✝ : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr val✝¹) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl (inl val✝)) ↔
    inr val✝¹ ≤ inl (inl val✝)

Next tactic:
simp [Equiv.sumAssoc]
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type*) [LE α] [LE β] [LE γ] : Sum (Sum α β) γ ≃o Sum α (Sum β γ) :=
  { Equiv.sumAssoc α β γ with
    map_rel_iff' := @fun a b => by
      rcases a with ((_ | _) | _) <;> rcases b with ((_ | _) | _) <;>
      

Proof state:
case inr.inl.inr
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁵ : LE α✝
inst✝⁴ : LE β✝
inst✝³ : LE γ✝
a : α✝
b : β✝
c : γ✝
α : Type u_5
β : Type u_6
γ : Type u_7
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
src✝ : (α ⊕ β) ⊕ γ ≃ α ⊕ β ⊕ γ := Equiv.sumAssoc α β γ
val✝¹ : γ
val✝ : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr val✝¹) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl (inr val✝)) ↔
    inr val✝¹ ≤ inl (inr val✝)

Next tactic:
simp [Equiv.sumAssoc]
/-- `Equiv.sumAssoc` promoted to an order isomorphism. -/
def sumAssoc (α β γ : Type*) [LE α] [LE β] [LE γ] : Sum (Sum α β) γ ≃o Sum α (Sum β γ) :=
  { Equiv.sumAssoc α β γ with
    map_rel_iff' := @fun a b => by
      rcases a with ((_ | _) | _) <;> rcases b with ((_ | _) | _) <;>
      

Proof state:
case inr.inr
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁵ : LE α✝
inst✝⁴ : LE β✝
inst✝³ : LE γ✝
a : α✝
b : β✝
c : γ✝
α : Type u_5
β : Type u_6
γ : Type u_7
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
src✝ : (α ⊕ β) ⊕ γ ≃ α ⊕ β ⊕ γ := Equiv.sumAssoc α β γ
val✝¹ val✝ : γ
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr val✝¹) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr val✝) ↔
    inr val✝¹ ≤ inr val✝

Next tactic:
simp [Equiv.sumAssoc]
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      

Proof state:
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a : α✝
b : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
⊢ ∀ {a b : (α ⊕ β)ᵒᵈ},
    { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
          a ≤
        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
          b ↔
      a ≤ b

Next tactic:
rintro (a | a) (b | b)
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · 

Proof state:
case inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a b : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl b) ↔
    inl a ≤ inl b

Next tactic:
change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
        

Proof state:
case inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a b : α
⊢ inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)

Next tactic:
simp [toDual_le_toDual, inl_le_inl_iff]
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
        simp [toDual_le_toDual, inl_le_inl_iff]
      · 

Proof state:
case inl.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a : α
b : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr b) ↔
    inl a ≤ inr b

Next tactic:
exact iff_of_false (@not_inl_le_inr (OrderDual β) (OrderDual α) _ _ _ _) not_inr_le_inl
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
        simp [toDual_le_toDual, inl_le_inl_iff]
      · exact iff_of_false (@not_inl_le_inr (OrderDual β) (OrderDual α) _ _ _ _) not_inr_le_inl
      · 

Proof state:
case inr.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a : β
b : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl b) ↔
    inr a ≤ inl b

Next tactic:
exact iff_of_false (@not_inr_le_inl (OrderDual α) (OrderDual β) _ _ _ _) not_inl_le_inr
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
        simp [toDual_le_toDual, inl_le_inl_iff]
      · exact iff_of_false (@not_inl_le_inr (OrderDual β) (OrderDual α) _ _ _ _) not_inr_le_inl
      · exact iff_of_false (@not_inr_le_inl (OrderDual α) (OrderDual β) _ _ _ _) not_inl_le_inr
      · 

Proof state:
case inr.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a b : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr b) ↔
    inr a ≤ inr b

Next tactic:
change inr (toDual a) ≤ inr (toDual b) ↔ toDual (inr a) ≤ toDual (inr b)
/-- `orderDual` is distributive over `⊕` up to an order isomorphism. -/
def sumDualDistrib (α β : Type*) [LE α] [LE β] : (Sum α β)ᵒᵈ ≃o Sum αᵒᵈ βᵒᵈ :=
  { Equiv.refl _ with
    map_rel_iff' := by
      rintro (a | a) (b | b)
      · change inl (toDual a) ≤ inl (toDual b) ↔ toDual (inl a) ≤ toDual (inl b)
        simp [toDual_le_toDual, inl_le_inl_iff]
      · exact iff_of_false (@not_inl_le_inr (OrderDual β) (OrderDual α) _ _ _ _) not_inr_le_inl
      · exact iff_of_false (@not_inr_le_inl (OrderDual α) (OrderDual β) _ _ _ _) not_inl_le_inr
      · change inr (toDual a) ≤ inr (toDual b) ↔ toDual (inr a) ≤ toDual (inr b)
        

Proof state:
case inr.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : (α ⊕ β)ᵒᵈ ≃ (α ⊕ β)ᵒᵈ := Equiv.refl (α ⊕ β)ᵒᵈ
a b : β
⊢ inr (toDual a) ≤ inr (toDual b) ↔ toDual (inr a) ≤ toDual (inr b)

Next tactic:
simp [toDual_le_toDual, inr_le_inr_iff]
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      

Proof state:
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a b : (_root_.Lex (α ⊕ β))ᵒᵈ
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        a ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        b ↔
    a ≤ b

Next tactic:
rcases a with (a | a)
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> 

Proof state:
case inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
b : (_root_.Lex (α ⊕ β))ᵒᵈ
a : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        b ↔
    inl a ≤ b

Next tactic:
rcases b with (b | b)
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> 

Proof state:
case inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
b : (_root_.Lex (α ⊕ β))ᵒᵈ
a : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        b ↔
    inr a ≤ b

Next tactic:
rcases b with (b | b)
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> rcases b with (b | b); 

Proof state:
case inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a b : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl b) ↔
    inl a ≤ inl b
case inl.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a : α
b : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr b) ↔
    inl a ≤ inr b
case inr.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a : β
b : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl b) ↔
    inr a ≤ inl b
case inr.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a b : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr b) ↔
    inr a ≤ inr b

Next tactic:
simp
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> rcases b with (b | b); simp
      · 

Proof state:
case inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a b : α
⊢ inr a ≤ inr b ↔ inl a ≤ inl b

Next tactic:
change
          toLex (inr <| toDual a) ≤ toLex (inr <| toDual b) ↔
            toDual (toLex <| inl a) ≤ toDual (toLex <| inl b)
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> rcases b with (b | b); simp
      · change
          toLex (inr <| toDual a) ≤ toLex (inr <| toDual b) ↔
            toDual (toLex <| inl a) ≤ toDual (toLex <| inl b)
        

Proof state:
case inl.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a b : α
⊢ toLex (inr (toDual a)) ≤ toLex (inr (toDual b)) ↔ toDual (toLex (inl a)) ≤ toDual (toLex (inl b))

Next tactic:
simp [toDual_le_toDual, Lex.inl_le_inl_iff, Lex.inr_le_inr_iff]
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> rcases b with (b | b); simp
      · change
          toLex (inr <| toDual a) ≤ toLex (inr <| toDual b) ↔
            toDual (toLex <| inl a) ≤ toDual (toLex <| inl b)
        simp [toDual_le_toDual, Lex.inl_le_inl_iff, Lex.inr_le_inr_iff]
      · 

Proof state:
case inl.inr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a : α
b : β
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr b) ↔
    inl a ≤ inr b

Next tactic:
exact iff_of_false (@Lex.not_inr_le_inl (OrderDual β) (OrderDual α) _ _ _ _)
          Lex.not_inr_le_inl
/-- `OrderDual` is antidistributive over `⊕ₗ` up to an order isomorphism. -/
def sumLexDualAntidistrib (α β : Type*) [LE α] [LE β] : (α ⊕ₗ β)ᵒᵈ ≃o βᵒᵈ ⊕ₗ αᵒᵈ :=
  { Equiv.sumComm α β with
    map_rel_iff' := @fun a b => by
      rcases a with (a | a) <;> rcases b with (b | b); simp
      · change
          toLex (inr <| toDual a) ≤ toLex (inr <| toDual b) ↔
            toDual (toLex <| inl a) ≤ toDual (toLex <| inl b)
        simp [toDual_le_toDual, Lex.inl_le_inl_iff, Lex.inr_le_inr_iff]
      · exact iff_of_false (@Lex.not_inr_le_inl (OrderDual β) (OrderDual α) _ _ _ _)
          Lex.not_inr_le_inl
      · 

Proof state:
case inr.inl
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : LE α✝
inst✝³ : LE β✝
inst✝² : LE γ
a✝ : α✝
b✝ : β✝
c : γ
α : Type u_5
β : Type u_6
inst✝¹ : LE α
inst✝ : LE β
src✝ : α ⊕ β ≃ β ⊕ α := Equiv.sumComm α β
a : β
b : α
⊢ { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inr a) ≤
      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        (inl b) ↔
    inr a ≤ inl b

Next tactic:
exact iff_of_true (@Lex.inl_le_inr (OrderDual β) (OrderDual α) _ _ _ _)
          (Lex.inl_le_inr _ _)