ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
⊢ WellFounded fun x x_1 => x < x_1
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
⊢ WellFounded fun x x_1 => x < x_1
let _ : ∀ i, Zero (β i) := fun i ↦ ⟨e i 0⟩
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
⊢ WellFounded fun x x_1 => x < x_1
refine Subrelation.wf (fun h => ?_) <| InvImage.wf (mapRange (fun i ↦ e i) fun _ ↦ rfl) this
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this✝ : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
this : IsStrictOrder ι (Function.swap WellOrderingRel)
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
have := IsStrictOrder.swap (@WellOrderingRel ι)
case intro.intro
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this✝ : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
this : IsStrictOrder ι (Function.swap WellOrderingRel)
i : ι
he : ∀ (j : ι), Function.swap WellOrderingRel j i → ↑x✝ j ≤ ↑y✝ j ∧ ↑y✝ j ≤ ↑x✝ j
hl : ↑x✝ i < ↑y✝ i
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this✝ : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
this : IsStrictOrder ι (Function.swap WellOrderingRel)
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
obtain ⟨i, he, hl⟩ := lex_lt_of_lt_of_preorder (Function.swap WellOrderingRel) h
no goals
case intro.intro
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this✝ : WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
x✝ y✝ : Π₀ (i : ι), α i
h : x✝ < y✝
this : IsStrictOrder ι (Function.swap WellOrderingRel)
i : ι
he : ∀ (j : ι), Function.swap WellOrderingRel j i → ↑x✝ j ≤ ↑y✝ j ∧ ↑y✝ j ≤ ↑x✝ j
hl : ↑x✝ i < ↑y✝ i
⊢ InvImage (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝
exact ⟨i, fun j hj ↦ Quot.sound (he j hj), hl⟩
case this
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
case this
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
⊢ WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
have := IsTrichotomous.swap (@WellOrderingRel ι)
case this.refine_1
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ ∀ ⦃i : ι⦄ ⦃a : β i⦄, ¬a < 0

case this.refine_2
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded (Function.swap (Function.swap WellOrderingRel))
case this
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded (Dfinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)
refine Lex.wellFounded' ?_ (fun i ↦ IsWellFounded.wf) ?_
case this.refine_1.mk
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
i : ι
a✝ : β i
a : α i
⊢ ¬Quot.mk Setoid.r a < 0
case this.refine_1
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ ∀ ⦃i : ι⦄ ⦃a : β i⦄, ¬a < 0
rintro i ⟨a⟩
no goals
case this.refine_1.mk
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
i : ι
a✝ : β i
a : α i
⊢ ¬Quot.mk Setoid.r a < 0
apply hbot
case this.refine_2
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded fun y x => WellOrderingRel y x
case this.refine_2
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded (Function.swap (Function.swap WellOrderingRel))
simp only [Function.swap]
no goals
case this.refine_2
ι : Type u_2
α : ι → Type u_1
r : ι → ι → Prop
s : (i : ι) → α i → α i → Prop
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
inst✝ : ∀ (i : ι), WellFoundedLT (α i)
hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0
β : ι → Type u_1 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1
e : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1
x✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }
this : IsTrichotomous ι (Function.swap WellOrderingRel)
⊢ WellFounded fun y x => WellOrderingRel y x
exact IsWellFounded.wf