l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem measure_eq_zero_iff_eq_empty_of_smulInvariant (hμ : μ ≠ 0) (hU : IsOpen U) :
    μ U = 0 ↔ U = ∅ := by
  

Proof state:
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁸ : Group G
inst✝⁷ : MulAction G α
inst✝⁶ : MeasurableSpace G
inst✝⁵ : MeasurableSMul G α
c : G
μ : Measure α
inst✝⁴ : SMulInvariantMeasure G α μ
inst✝³ : TopologicalSpace α
inst✝² : ContinuousConstSMul G α
inst✝¹ : MulAction.IsMinimal G α
K U : Set α
inst✝ : Regular μ
hμ : μ ≠ 0
hU : IsOpen U
⊢ ↑↑μ U = 0 ↔ U = ∅

Next tactic:
rw [← not_iff_not, ← Ne.def, ← pos_iff_ne_zero,
    measure_pos_iff_nonempty_of_smulInvariant G hμ hU, nonempty_iff_ne_empty]
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  

Proof state:
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x y : G
hs : x • s =ᶠ[ae μ] s
hy : y ∈ Subgroup.zpowers x
⊢ y • s =ᶠ[ae μ] s

Next tactic:
obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
let e : α ≃ α := MulAction.toPermHom G α x
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  let e : α ≃ α := MulAction.toPermHom G α x
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
e : α ≃ α := (MulAction.toPermHom G α) x
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
have he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  let e : α ≃ α := MulAction.toPermHom G α x
  have he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
e : α ≃ α := (MulAction.toPermHom G α) x
he : QuasiMeasurePreserving ⇑e
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
have he' : QuasiMeasurePreserving e.symm μ μ :=
    (measurePreserving_smul x⁻¹ μ).quasiMeasurePreserving
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  let e : α ≃ α := MulAction.toPermHom G α x
  have he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving
  have he' : QuasiMeasurePreserving e.symm μ μ :=
    (measurePreserving_smul x⁻¹ μ).quasiMeasurePreserving
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
e : α ≃ α := (MulAction.toPermHom G α) x
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
have h := he.image_zpow_ae_eq he' k hs
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  let e : α ≃ α := MulAction.toPermHom G α x
  have he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving
  have he' : QuasiMeasurePreserving e.symm μ μ :=
    (measurePreserving_smul x⁻¹ μ).quasiMeasurePreserving
  have h := he.image_zpow_ae_eq he' k hs
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
e : α ≃ α := (MulAction.toPermHom G α) x
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
h : ⇑(e ^ k) '' s =ᶠ[ae μ] s
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
simp only [← MonoidHom.map_zpow] at h
theorem smul_ae_eq_self_of_mem_zpowers {x y : G} (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s := by
  obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy
  let e : α ≃ α := MulAction.toPermHom G α x
  have he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving
  have he' : QuasiMeasurePreserving e.symm μ μ :=
    (measurePreserving_smul x⁻¹ μ).quasiMeasurePreserving
  have h := he.image_zpow_ae_eq he' k hs
  simp only [← MonoidHom.map_zpow] at h
  

Proof state:
case intro
G : Type u
M : Type v
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
x : G
hs : x • s =ᶠ[ae μ] s
k : ℤ
hy : x ^ k ∈ Subgroup.zpowers x
e : α ≃ α := (MulAction.toPermHom G α) x
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
h : (fun a => ((MulAction.toPermHom G α) (x ^ k)) a) '' s =ᶠ[ae μ] s
⊢ x ^ k • s =ᶠ[ae μ] s

Next tactic:
simpa only [MulAction.toPermHom_apply, MulAction.toPerm_apply, image_smul] using h
theorem vadd_ae_eq_self_of_mem_zmultiples {G : Type u} {α : Type w} {s : Set α}
    {m : MeasurableSpace α} [AddGroup G] [AddAction G α] [MeasurableSpace G] [MeasurableVAdd G α]
    {μ : Measure α} [VAddInvariantMeasure G α μ] {x y : G}
    (hs : (x +ᵥ s : Set α) =ᵐ[μ] s) (hy : y ∈ AddSubgroup.zmultiples x) :
    (y +ᵥ s : Set α) =ᵐ[μ] s := by
  

Proof state:
G✝ : Type u
M : Type v
α✝ : Type w
s✝ : Set α✝
m✝ : MeasurableSpace α✝
inst✝⁹ : Group G✝
inst✝⁸ : MulAction G✝ α✝
inst✝⁷ : MeasurableSpace G✝
inst✝⁶ : MeasurableSMul G✝ α✝
c : G✝
μ✝ : Measure α✝
inst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝
G : Type u
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : AddGroup G
inst✝³ : AddAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableVAdd G α
μ : Measure α
inst✝ : VAddInvariantMeasure G α μ
x y : G
hs : x +ᵥ s =ᶠ[ae μ] s
hy : y ∈ AddSubgroup.zmultiples x
⊢ y +ᵥ s =ᶠ[ae μ] s

Next tactic:
letI : MeasurableSpace (Multiplicative G) := (inferInstanceAs (MeasurableSpace G))
theorem vadd_ae_eq_self_of_mem_zmultiples {G : Type u} {α : Type w} {s : Set α}
    {m : MeasurableSpace α} [AddGroup G] [AddAction G α] [MeasurableSpace G] [MeasurableVAdd G α]
    {μ : Measure α} [VAddInvariantMeasure G α μ] {x y : G}
    (hs : (x +ᵥ s : Set α) =ᵐ[μ] s) (hy : y ∈ AddSubgroup.zmultiples x) :
    (y +ᵥ s : Set α) =ᵐ[μ] s := by
  letI : MeasurableSpace (Multiplicative G) := (inferInstanceAs (MeasurableSpace G))
  

Proof state:
G✝ : Type u
M : Type v
α✝ : Type w
s✝ : Set α✝
m✝ : MeasurableSpace α✝
inst✝⁹ : Group G✝
inst✝⁸ : MulAction G✝ α✝
inst✝⁷ : MeasurableSpace G✝
inst✝⁶ : MeasurableSMul G✝ α✝
c : G✝
μ✝ : Measure α✝
inst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝
G : Type u
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : AddGroup G
inst✝³ : AddAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableVAdd G α
μ : Measure α
inst✝ : VAddInvariantMeasure G α μ
x y : G
hs : x +ᵥ s =ᶠ[ae μ] s
hy : y ∈ AddSubgroup.zmultiples x
this : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)
⊢ y +ᵥ s =ᶠ[ae μ] s

Next tactic:
letI : SMulInvariantMeasure (Multiplicative G) α μ :=
    ⟨fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g)⟩
theorem vadd_ae_eq_self_of_mem_zmultiples {G : Type u} {α : Type w} {s : Set α}
    {m : MeasurableSpace α} [AddGroup G] [AddAction G α] [MeasurableSpace G] [MeasurableVAdd G α]
    {μ : Measure α} [VAddInvariantMeasure G α μ] {x y : G}
    (hs : (x +ᵥ s : Set α) =ᵐ[μ] s) (hy : y ∈ AddSubgroup.zmultiples x) :
    (y +ᵥ s : Set α) =ᵐ[μ] s := by
  letI : MeasurableSpace (Multiplicative G) := (inferInstanceAs (MeasurableSpace G))
  letI : SMulInvariantMeasure (Multiplicative G) α μ :=
    ⟨fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g)⟩
  

Proof state:
G✝ : Type u
M : Type v
α✝ : Type w
s✝ : Set α✝
m✝ : MeasurableSpace α✝
inst✝⁹ : Group G✝
inst✝⁸ : MulAction G✝ α✝
inst✝⁷ : MeasurableSpace G✝
inst✝⁶ : MeasurableSMul G✝ α✝
c : G✝
μ✝ : Measure α✝
inst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝
G : Type u
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : AddGroup G
inst✝³ : AddAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableVAdd G α
μ : Measure α
inst✝ : VAddInvariantMeasure G α μ
x y : G
hs : x +ᵥ s =ᶠ[ae μ] s
hy : y ∈ AddSubgroup.zmultiples x
this✝ : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)
this : SMulInvariantMeasure (Multiplicative G) α μ :=
  { measure_preimage_smul := fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g) }
⊢ y +ᵥ s =ᶠ[ae μ] s

Next tactic:
letI : MeasurableSMul (Multiplicative G) α :=
    { measurable_const_smul := fun g => measurable_const_vadd (Multiplicative.toAdd g)
      measurable_smul_const := fun a =>
        @measurable_vadd_const (Multiplicative G) α (inferInstanceAs (VAdd G α)) _ _
          (inferInstanceAs (MeasurableVAdd G α)) a }
theorem vadd_ae_eq_self_of_mem_zmultiples {G : Type u} {α : Type w} {s : Set α}
    {m : MeasurableSpace α} [AddGroup G] [AddAction G α] [MeasurableSpace G] [MeasurableVAdd G α]
    {μ : Measure α} [VAddInvariantMeasure G α μ] {x y : G}
    (hs : (x +ᵥ s : Set α) =ᵐ[μ] s) (hy : y ∈ AddSubgroup.zmultiples x) :
    (y +ᵥ s : Set α) =ᵐ[μ] s := by
  letI : MeasurableSpace (Multiplicative G) := (inferInstanceAs (MeasurableSpace G))
  letI : SMulInvariantMeasure (Multiplicative G) α μ :=
    ⟨fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g)⟩
  letI : MeasurableSMul (Multiplicative G) α :=
    { measurable_const_smul := fun g => measurable_const_vadd (Multiplicative.toAdd g)
      measurable_smul_const := fun a =>
        @measurable_vadd_const (Multiplicative G) α (inferInstanceAs (VAdd G α)) _ _
          (inferInstanceAs (MeasurableVAdd G α)) a }
  

Proof state:
G✝ : Type u
M : Type v
α✝ : Type w
s✝ : Set α✝
m✝ : MeasurableSpace α✝
inst✝⁹ : Group G✝
inst✝⁸ : MulAction G✝ α✝
inst✝⁷ : MeasurableSpace G✝
inst✝⁶ : MeasurableSMul G✝ α✝
c : G✝
μ✝ : Measure α✝
inst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝
G : Type u
α : Type w
s : Set α
m : MeasurableSpace α
inst✝⁴ : AddGroup G
inst✝³ : AddAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableVAdd G α
μ : Measure α
inst✝ : VAddInvariantMeasure G α μ
x y : G
hs : x +ᵥ s =ᶠ[ae μ] s
hy : y ∈ AddSubgroup.zmultiples x
this✝¹ : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)
this✝ : SMulInvariantMeasure (Multiplicative G) α μ :=
  { measure_preimage_smul := fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g) }
this : MeasurableSMul (Multiplicative G) α :=
  { measurable_const_smul := fun g => measurable_const_vadd (Multiplicative.toAdd g),
    measurable_smul_const := fun a => measurable_vadd_const a }
⊢ y +ᵥ s =ᶠ[ae μ] s

Next tactic:
exact smul_ae_eq_self_of_mem_zpowers (G := Multiplicative G) hs hy
instance funLike {μ : YoungDiagram} : FunLike (Ssyt μ) ℕ fun _ ↦ ℕ → ℕ where
  coe := Ssyt.entry
  coe_injective' T T' h := by
    

Proof state:
μ : YoungDiagram
T T' : Ssyt μ
h : T.entry = T'.entry
⊢ T = T'

Next tactic:
cases T
instance funLike {μ : YoungDiagram} : FunLike (Ssyt μ) ℕ fun _ ↦ ℕ → ℕ where
  coe := Ssyt.entry
  coe_injective' T T' h := by
    cases T
    

Proof state:
case mk
μ : YoungDiagram
T' : Ssyt μ
entry✝ : ℕ → ℕ → ℕ
row_weak'✝ : ∀ {i j1 j2 : ℕ}, j1 < j2 → (i, j2) ∈ μ → entry✝ i j1 ≤ entry✝ i j2
col_strict'✝ : ∀ {i1 i2 j : ℕ}, i1 < i2 → (i2, j) ∈ μ → entry✝ i1 j < entry✝ i2 j
zeros'✝ : ∀ {i j : ℕ}, (i, j) ∉ μ → entry✝ i j = 0
h : { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ }.entry = T'.entry
⊢ { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ } = T'

Next tactic:
cases T'
instance funLike {μ : YoungDiagram} : FunLike (Ssyt μ) ℕ fun _ ↦ ℕ → ℕ where
  coe := Ssyt.entry
  coe_injective' T T' h := by
    cases T
    cases T'
    

Proof state:
case mk.mk
μ : YoungDiagram
entry✝¹ : ℕ → ℕ → ℕ
row_weak'✝¹ : ∀ {i j1 j2 : ℕ}, j1 < j2 → (i, j2) ∈ μ → entry✝¹ i j1 ≤ entry✝¹ i j2
col_strict'✝¹ : ∀ {i1 i2 j : ℕ}, i1 < i2 → (i2, j) ∈ μ → entry✝¹ i1 j < entry✝¹ i2 j
zeros'✝¹ : ∀ {i j : ℕ}, (i, j) ∉ μ → entry✝¹ i j = 0
entry✝ : ℕ → ℕ → ℕ
row_weak'✝ : ∀ {i j1 j2 : ℕ}, j1 < j2 → (i, j2) ∈ μ → entry✝ i j1 ≤ entry✝ i j2
col_strict'✝ : ∀ {i1 i2 j : ℕ}, i1 < i2 → (i2, j) ∈ μ → entry✝ i1 j < entry✝ i2 j
zeros'✝ : ∀ {i j : ℕ}, (i, j) ∉ μ → entry✝ i j = 0
h :
  { entry := entry✝¹, row_weak' := row_weak'✝¹, col_strict' := col_strict'✝¹, zeros' := zeros'✝¹ }.entry =
    { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ }.entry
⊢ { entry := entry✝¹, row_weak' := row_weak'✝¹, col_strict' := col_strict'✝¹, zeros' := zeros'✝¹ } =
    { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ }

Next tactic:
congr
@[ext]
theorem ext {μ : YoungDiagram} {T T' : Ssyt μ} (h : ∀ i j, T i j = T' i j) : T = T' :=
  FunLike.ext T T' fun _ ↦ by
    

Proof state:
μ : YoungDiagram
T T' : Ssyt μ
h : ∀ (i j : ℕ), T i j = T' i j
x✝ : ℕ
⊢ T x✝ = T' x✝

Next tactic:
funext
@[ext]
theorem ext {μ : YoungDiagram} {T T' : Ssyt μ} (h : ∀ i j, T i j = T' i j) : T = T' :=
  FunLike.ext T T' fun _ ↦ by
    funext
    

Proof state:
case h
μ : YoungDiagram
T T' : Ssyt μ
h : ∀ (i j : ℕ), T i j = T' i j
x✝¹ x✝ : ℕ
⊢ T x✝¹ x✝ = T' x✝¹ x✝

Next tactic:
apply h
theorem row_weak_of_le {μ : YoungDiagram} (T : Ssyt μ) {i j1 j2 : ℕ} (hj : j1 ≤ j2)
    (cell : (i, j2) ∈ μ) : T i j1 ≤ T i j2 := by
  

Proof state:
μ : YoungDiagram
T : Ssyt μ
i j1 j2 : ℕ
hj : j1 ≤ j2
cell : (i, j2) ∈ μ
⊢ T i j1 ≤ T i j2

Next tactic:
cases' eq_or_lt_of_le hj with h h
theorem row_weak_of_le {μ : YoungDiagram} (T : Ssyt μ) {i j1 j2 : ℕ} (hj : j1 ≤ j2)
    (cell : (i, j2) ∈ μ) : T i j1 ≤ T i j2 := by
  cases' eq_or_lt_of_le hj with h h
  · 

Proof state:
case inl
μ : YoungDiagram
T : Ssyt μ
i j1 j2 : ℕ
hj : j1 ≤ j2
cell : (i, j2) ∈ μ
h : j1 = j2
⊢ T i j1 ≤ T i j2

Next tactic:
rw [h]
theorem row_weak_of_le {μ : YoungDiagram} (T : Ssyt μ) {i j1 j2 : ℕ} (hj : j1 ≤ j2)
    (cell : (i, j2) ∈ μ) : T i j1 ≤ T i j2 := by
  cases' eq_or_lt_of_le hj with h h
  · rw [h]
  · 

Proof state:
case inr
μ : YoungDiagram
T : Ssyt μ
i j1 j2 : ℕ
hj : j1 ≤ j2
cell : (i, j2) ∈ μ
h : j1 < j2
⊢ T i j1 ≤ T i j2

Next tactic:
exact T.row_weak h cell
theorem col_weak {μ : YoungDiagram} (T : Ssyt μ) {i1 i2 j : ℕ} (hi : i1 ≤ i2) (cell : (i2, j) ∈ μ) :
    T i1 j ≤ T i2 j := by
  

Proof state:
μ : YoungDiagram
T : Ssyt μ
i1 i2 j : ℕ
hi : i1 ≤ i2
cell : (i2, j) ∈ μ
⊢ T i1 j ≤ T i2 j

Next tactic:
cases' eq_or_lt_of_le hi with h h
theorem col_weak {μ : YoungDiagram} (T : Ssyt μ) {i1 i2 j : ℕ} (hi : i1 ≤ i2) (cell : (i2, j) ∈ μ) :
    T i1 j ≤ T i2 j := by
  cases' eq_or_lt_of_le hi with h h
  · 

Proof state:
case inl
μ : YoungDiagram
T : Ssyt μ
i1 i2 j : ℕ
hi : i1 ≤ i2
cell : (i2, j) ∈ μ
h : i1 = i2
⊢ T i1 j ≤ T i2 j

Next tactic:
rw [h]
theorem col_weak {μ : YoungDiagram} (T : Ssyt μ) {i1 i2 j : ℕ} (hi : i1 ≤ i2) (cell : (i2, j) ∈ μ) :
    T i1 j ≤ T i2 j := by
  cases' eq_or_lt_of_le hi with h h
  · rw [h]
  · 

Proof state:
case inr
μ : YoungDiagram
T : Ssyt μ
i1 i2 j : ℕ
hi : i1 ≤ i2
cell : (i2, j) ∈ μ
h : i1 < i2
⊢ T i1 j ≤ T i2 j

Next tactic:
exact le_of_lt (T.col_strict h cell)
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    

Proof state:
μ : YoungDiagram
i✝ j1✝ j2✝ : ℕ
hj : j1✝ < j2✝
hcell : (i✝, j2✝) ∈ μ
⊢ (fun i j => if (i, j) ∈ μ then i else 0) i✝ j1✝ ≤ (fun i j => if (i, j) ∈ μ then i else 0) i✝ j2✝

Next tactic:
simp only
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    simp only
    

Proof state:
μ : YoungDiagram
i✝ j1✝ j2✝ : ℕ
hj : j1✝ < j2✝
hcell : (i✝, j2✝) ∈ μ
⊢ (if (i✝, j1✝) ∈ μ then i✝ else 0) ≤ if (i✝, j2✝) ∈ μ then i✝ else 0

Next tactic:
rw [if_pos hcell, if_pos (μ.up_left_mem (by rfl) (le_of_lt hj) hcell)]
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    simp only
    rw [if_pos hcell, if_pos (μ.up_left_mem (by 

Proof state:
μ : YoungDiagram
i✝ j1✝ j2✝ : ℕ
hj : j1✝ < j2✝
hcell : (i✝, j2✝) ∈ μ
⊢ i✝ ≤ i✝

Next tactic:
rfl
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    simp only
    rw [if_pos hcell, if_pos (μ.up_left_mem (by rfl) (le_of_lt hj) hcell)]
  col_strict' hi hcell := by
    

Proof state:
μ : YoungDiagram
i1✝ i2✝ j✝ : ℕ
hi : i1✝ < i2✝
hcell : (i2✝, j✝) ∈ μ
⊢ (fun i j => if (i, j) ∈ μ then i else 0) i1✝ j✝ < (fun i j => if (i, j) ∈ μ then i else 0) i2✝ j✝

Next tactic:
simp only
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    simp only
    rw [if_pos hcell, if_pos (μ.up_left_mem (by rfl) (le_of_lt hj) hcell)]
  col_strict' hi hcell := by
    simp only
    

Proof state:
μ : YoungDiagram
i1✝ i2✝ j✝ : ℕ
hi : i1✝ < i2✝
hcell : (i2✝, j✝) ∈ μ
⊢ (if (i1✝, j✝) ∈ μ then i1✝ else 0) < if (i2✝, j✝) ∈ μ then i2✝ else 0

Next tactic:
rwa [if_pos hcell, if_pos (μ.up_left_mem (le_of_lt hi) (by rfl) hcell)]
/-- The "highest weight" SSYT of a given shape has all i's in row i, for each i. -/
def highestWeight (μ : YoungDiagram) : Ssyt μ where
  entry i j := if (i, j) ∈ μ then i else 0
  row_weak' hj hcell := by
    simp only
    rw [if_pos hcell, if_pos (μ.up_left_mem (by rfl) (le_of_lt hj) hcell)]
  col_strict' hi hcell := by
    simp only
    rwa [if_pos hcell, if_pos (μ.up_left_mem (le_of_lt hi) (by 

Proof state:
μ : YoungDiagram
i1✝ i2✝ j✝ : ℕ
hi : i1✝ < i2✝
hcell : (i2✝, j✝) ∈ μ
⊢ j✝ ≤ j✝

Next tactic:
rfl
/-- The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. -/
noncomputable def ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X where
  dist x y := ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0)
  dist_self x :=
    (NNReal.coe_eq_zero _).2 <|
      nonpos_iff_eq_zero.1 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by 

Proof state:
X : Type u_1
d : X → X → ℝ≥0
dist_self : ∀ (x : X), d x x = 0
dist_comm : ∀ (x y : X), d x y = d y x
x : X
⊢ sum (zipWith d [x] ([] ++ [x])) = 0

Next tactic:
simp [dist_self]
/-- The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. -/
noncomputable def ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X where
  dist x y := ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0)
  dist_self x :=
    (NNReal.coe_eq_zero _).2 <|
      nonpos_iff_eq_zero.1 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by simp [dist_self]
  dist_comm x y :=
    NNReal.coe_eq.2 <| by
      

Proof state:
X : Type u_1
d : X → X → ℝ≥0
dist_self : ∀ (x : X), d x x = 0
dist_comm : ∀ (x y : X), d x y = d y x
x y : X
⊢ ⨅ l, sum (zipWith d (x :: l) (l ++ [y])) = ⨅ l, sum (zipWith d (y :: l) (l ++ [x]))

Next tactic:
refine' reverse_surjective.iInf_congr _ fun l => _
/-- The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. -/
noncomputable def ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X where
  dist x y := ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0)
  dist_self x :=
    (NNReal.coe_eq_zero _).2 <|
      nonpos_iff_eq_zero.1 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by simp [dist_self]
  dist_comm x y :=
    NNReal.coe_eq.2 <| by
      refine' reverse_surjective.iInf_congr _ fun l => _
      

Proof state:
X : Type u_1
d : X → X → ℝ≥0
dist_self : ∀ (x : X), d x x = 0
dist_comm : ∀ (x y : X), d x y = d y x
x y : X
l : List X
⊢ sum (zipWith d (y :: reverse l) (reverse l ++ [x])) = sum (zipWith d (x :: l) (l ++ [y]))

Next tactic:
rw [← sum_reverse, zipWith_distrib_reverse, reverse_append, reverse_reverse,
        reverse_singleton, singleton_append, reverse_cons, reverse_reverse,
        zipWith_comm_of_comm _ dist_comm]
/-- The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. -/
noncomputable def ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X where
  dist x y := ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0)
  dist_self x :=
    (NNReal.coe_eq_zero _).2 <|
      nonpos_iff_eq_zero.1 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by simp [dist_self]
  dist_comm x y :=
    NNReal.coe_eq.2 <| by
      refine' reverse_surjective.iInf_congr _ fun l => _
      rw [← sum_reverse, zipWith_distrib_reverse, reverse_append, reverse_reverse,
        reverse_singleton, singleton_append, reverse_cons, reverse_reverse,
        zipWith_comm_of_comm _ dist_comm]
      

Proof state:
case h
X : Type u_1
d : X → X → ℝ≥0
dist_self : ∀ (x : X), d x x = 0
dist_comm : ∀ (x y : X), d x y = d y x
x y : X
l : List X
⊢ length (y :: reverse l) = length (reverse l ++ [x])

Next tactic:
simp only [length, length_append]