ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Primrec.option_orElse
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : Type u_5
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
x✝ : Option α × Option α
o₁ o₂ : Option α
⊢ (Option.casesOn (o₁, o₂).1 (o₁, o₂).2 fun b => ((o₁, o₂), b).1.1) =
    (fun x x_1 => HOrElse.hOrElse x fun x => x_1) (o₁, o₂).1 (o₁, o₂).2
state_after: no goals
tactic: cases o₁ <;> cases o₂ <;> rfl
Theorem: ZMod.card_units_eq_totient
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: n : ℕ
inst✝¹ : NeZero n
inst✝ : Fintype (ZMod n)ˣ
⊢ Fintype.card { x // x.val.Coprime n } = φ n
state_after: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ Fintype.card { x // x.val.Coprime (m + 1) } = φ (m + 1)
tactic: obtain ⟨m, rfl⟩ : ∃ m, n = m + 1 := exists_eq_succ_of_ne_zero NeZero.out
state_before: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ Fintype.card { x // x.val.Coprime (m + 1) } = φ (m + 1)
state_after: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ (∑ a : ZMod (m + 1), if a.val.Coprime (m + 1) then 1 else 0) =
    ∑ i : Fin (m + 1), if (↑i).Coprime (m + 1) then 1 else 0
tactic: simp only [totient, Finset.card_eq_sum_ones, Fintype.card_subtype, Finset.sum_filter, ←
        Fin.sum_univ_eq_sum_range, @Nat.coprime_comm (m + 1)]
state_before: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ (∑ a : ZMod (m + 1), if a.val.Coprime (m + 1) then 1 else 0) =
    ∑ i : Fin (m + 1), if (↑i).Coprime (m + 1) then 1 else 0
state_after: no goals
tactic: rfl
Theorem: LipschitzOnWith.extend_pi
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s
state_after: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
this : ∀ (i : ι), ∃ g, LipschitzWith K g ∧ EqOn (fun x => f x i) g s
⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s
tactic: have : ∀ i, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s := fun i => by
    have : LipschitzOnWith K (fun x : α => f x i) s :=
      LipschitzOnWith.of_dist_le_mul fun x hx y hy =>
        (dist_le_pi_dist _ _ i).trans (hf.dist_le_mul x hx y hy)
    exact this.extend_real
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
this : ∀ (i : ι), ∃ g, LipschitzWith K g ∧ EqOn (fun x => f x i) g s
⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s
state_after: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
g : ι → α → ℝ
hg : ∀ (i : ι), LipschitzWith K (g i) ∧ EqOn (fun x => f x i) (g i) s
⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s
tactic: choose g hg using this
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
g : ι → α → ℝ
hg : ∀ (i : ι), LipschitzWith K (g i) ∧ EqOn (fun x => f x i) (g i) s
⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s
state_after: case refine_1
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
g : ι → α → ℝ
hg : ∀ (i : ι), LipschitzWith K (g i) ∧ EqOn (fun x => f x i) (g i) s
x y : α
⊢ (dist (fun i => g i x) fun i => g i y) ≤ ↑K * dist x y

case refine_2
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
f✝ : α → β
inst✝ : Fintype ι
f : α → ι → ℝ
s : Set α
K : ℝ≥0
hf : LipschitzOnWith K f s
g : ι → α → ℝ
hg : ∀ (i : ι), LipschitzWith K (g i) ∧ EqOn (fun x => f x i) (g i) s
x : α
hx : x ∈ s
⊢ f x = (fun x i => g i x) x
tactic: refine ⟨fun x i => g i x, LipschitzWith.of_dist_le_mul fun x y => ?_, fun x hx ↦ ?_⟩
Theorem: Submodule.prod_map_fst
File: Mathlib/LinearAlgebra/Prod.lean

Proof steps:
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
p : Submodule R M
q : Submodule R M₂
⊢ map (fst R M M₂) (p.prod q) = p
state_after: case h
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
p : Submodule R M
q : Submodule R M₂
x : M
⊢ x ∈ map (fst R M M₂) (p.prod q) ↔ x ∈ p
tactic: ext x
state_before: case h
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
p : Submodule R M
q : Submodule R M₂
x : M
⊢ x ∈ map (fst R M M₂) (p.prod q) ↔ x ∈ p
state_after: no goals
tactic: simp [(⟨0, zero_mem _⟩ : ∃ x, x ∈ q)]
Theorem: PrimeSpectrum.vanishingIdeal_isClosed_isIrreducible
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s} = {P | P.IsPrime}
state_after: case refine_1
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s} ⊆ vanishingIdeal '' {s | IsIrreducible s}

case refine_2
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ vanishingIdeal '' {s | IsIrreducible s} ⊆ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s}
tactic: refine (subset_antisymm ?_ ?_).trans vanishingIdeal_isIrreducible
state_before: case refine_2
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ vanishingIdeal '' {s | IsIrreducible s} ⊆ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s}
state_after: case refine_2.intro.intro
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
s : Set (PrimeSpectrum R)
hs : s ∈ {s | IsIrreducible s}
⊢ vanishingIdeal s ∈ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s}
tactic: rintro _ ⟨s, hs, rfl⟩
state_before: case refine_2.intro.intro
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
s : Set (PrimeSpectrum R)
hs : s ∈ {s | IsIrreducible s}
⊢ vanishingIdeal s ∈ vanishingIdeal '' {s | IsClosed s ∧ IsIrreducible s}
state_after: no goals
tactic: exact ⟨closure s, ⟨isClosed_closure, hs.closure⟩, vanishingIdeal_closure s⟩
Theorem: List.destutter_eq_self_iff
File: Mathlib/Data/List/Destutter.lean

Proof steps:
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a b : α
⊢ destutter R [] = [] ↔ Chain' R []
state_after: no goals
tactic: simp
Theorem: WeierstrassCurve.Jacobian.map_neg
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

Proof steps:
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ neg (map W' f) (⇑f ∘ P) = ⇑f ∘ W'.neg P
state_after: case h
R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
i : Fin 3
⊢ neg (map W' f) (⇑f ∘ P) i = (⇑f ∘ W'.neg P) i
tactic: ext i
state_before: case h
R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
i : Fin 3
⊢ neg (map W' f) (⇑f ∘ P) i = (⇑f ∘ W'.neg P) i
state_after: no goals
tactic: fin_cases i <;> simp [neg]
Theorem: MeasureTheory.stoppedValue_sub_eq_sum
File: Mathlib/Probability/Process/Stopping.lean

Proof steps:
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
u : ℕ → Ω → β
τ π : Ω → ℕ
inst✝ : AddCommGroup β
hle : τ ≤ π
⊢ stoppedValue u π - stoppedValue u τ = fun ω => (∑ i ∈ Finset.Ico (τ ω) (π ω), (u (i + 1) - u i)) ω
state_after: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
u : ℕ → Ω → β
τ π : Ω → ℕ
inst✝ : AddCommGroup β
hle : τ ≤ π
ω : Ω
⊢ (stoppedValue u π - stoppedValue u τ) ω = (∑ i ∈ Finset.Ico (τ ω) (π ω), (u (i + 1) - u i)) ω
tactic: ext ω
state_before: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
u : ℕ → Ω → β
τ π : Ω → ℕ
inst✝ : AddCommGroup β
hle : τ ≤ π
ω : Ω
⊢ (stoppedValue u π - stoppedValue u τ) ω = (∑ i ∈ Finset.Ico (τ ω) (π ω), (u (i + 1) - u i)) ω
state_after: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
u : ℕ → Ω → β
τ π : Ω → ℕ
inst✝ : AddCommGroup β
hle : τ ≤ π
ω : Ω
⊢ (stoppedValue u π - stoppedValue u τ) ω = (u (π ω) - u 0 - (u (τ ω) - u 0)) ω
tactic: rw [Finset.sum_Ico_eq_sub _ (hle ω), Finset.sum_range_sub, Finset.sum_range_sub]
state_before: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
u : ℕ → Ω → β
τ π : Ω → ℕ
inst✝ : AddCommGroup β
hle : τ ≤ π
ω : Ω
⊢ (stoppedValue u π - stoppedValue u τ) ω = (u (π ω) - u 0 - (u (τ ω) - u 0)) ω
state_after: no goals
tactic: simp [stoppedValue]
Theorem: HomologicalComplex.singleObjOpcyclesSelfIso_inv_naturality
File: Mathlib/Algebra/Homology/SingleHomology.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : C
f : A ⟶ B
⊢ opcyclesMap ((single C c j).map f) j ≫ (singleObjOpcyclesSelfIso c j B).inv = (singleObjOpcyclesSelfIso c j A).inv ≫ f
state_after: no goals
tactic: rw [← cancel_mono (singleObjOpcyclesSelfIso c j B).hom, assoc, assoc, Iso.inv_hom_id,
    comp_id, ← singleObjOpcyclesSelfIso_hom_naturality, Iso.inv_hom_id_assoc]
Theorem: Real.exists_int_int_abs_mul_sub_le
File: Mathlib/NumberTheory/DiophantineApproximation.lean

Proof steps:
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
state_after: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
tactic: let f : ℤ → ℤ := fun m => ⌊fract (ξ * m) * (n + 1)⌋
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
state_after: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
tactic: have hn : 0 < (n : ℝ) + 1 := mod_cast Nat.succ_pos _
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
state_after: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
tactic: have hfu := fun m : ℤ => mul_lt_of_lt_one_left hn <| fract_lt_one (ξ * ↑m)
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
state_after: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1
tactic: conv in |_| ≤ _ => rw [mul_comm, le_div_iff hn, ← abs_of_pos hn, ← abs_mul]
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1
state_after: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1
tactic: let D := Icc (0 : ℤ) n
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1
state_after: case pos
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
H : ∃ m ∈ D, f m = ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1

case neg
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
H : ¬∃ m ∈ D, f m = ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1
tactic: by_cases H : ∃ m ∈ D, f m = n
Theorem: polynomialFunctions.starClosure_le_equalizer
File: Mathlib/Topology/ContinuousFunction/Polynomial.lean

Proof steps:
state_before: R : Type u_1
inst✝⁷ : CommSemiring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSemiring R
A : Type u_2
inst✝⁴ : StarRing R
inst✝³ : ContinuousStar R
inst✝² : Semiring A
inst✝¹ : StarRing A
inst✝ : Algebra R A
s : Set R
φ ψ : C(↑s, R) →⋆ₐ[R] A
h : φ ((toContinuousMapOnAlgHom s) X) = ψ ((toContinuousMapOnAlgHom s) X)
⊢ (polynomialFunctions s).starClosure ≤ StarAlgHom.equalizer φ ψ
state_after: R : Type u_1
inst✝⁷ : CommSemiring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSemiring R
A : Type u_2
inst✝⁴ : StarRing R
inst✝³ : ContinuousStar R
inst✝² : Semiring A
inst✝¹ : StarRing A
inst✝ : Algebra R A
s : Set R
φ ψ : C(↑s, R) →⋆ₐ[R] A
h : φ ((toContinuousMapOnAlgHom s) X) = ψ ((toContinuousMapOnAlgHom s) X)
⊢ adjoin R {(toContinuousMapOnAlgHom s) X} ≤ StarAlgHom.equalizer φ ψ
tactic: rw [polynomialFunctions.starClosure_eq_adjoin_X s]
state_before: R : Type u_1
inst✝⁷ : CommSemiring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSemiring R
A : Type u_2
inst✝⁴ : StarRing R
inst✝³ : ContinuousStar R
inst✝² : Semiring A
inst✝¹ : StarRing A
inst✝ : Algebra R A
s : Set R
φ ψ : C(↑s, R) →⋆ₐ[R] A
h : φ ((toContinuousMapOnAlgHom s) X) = ψ ((toContinuousMapOnAlgHom s) X)
⊢ adjoin R {(toContinuousMapOnAlgHom s) X} ≤ StarAlgHom.equalizer φ ψ
state_after: no goals
tactic: exact StarAlgHom.adjoin_le_equalizer φ ψ fun x hx => (Set.mem_singleton_iff.1 hx).symm ▸ h
Theorem: Composition.ones_blocksFun
File: Mathlib/Combinatorics/Enumerative/Composition.lean

Proof steps:
state_before: n✝ : ℕ
c : Composition n✝
n : ℕ
i : Fin (ones n).length
⊢ (ones n).blocksFun i = 1
state_after: no goals
tactic: simp only [blocksFun, ones, get_eq_getElem, getElem_replicate]
Theorem: Finset.image_congr
File: Mathlib/Data/Finset/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f g : α → β
s : Finset α
t : Finset β
a : α
b c : β
h : Set.EqOn f g ↑s
⊢ image f s = image g s
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f g : α → β
s : Finset α
t : Finset β
a : α
b c : β
h : Set.EqOn f g ↑s
a✝ : β
⊢ a✝ ∈ image f s ↔ a✝ ∈ image g s
tactic: ext
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f g : α → β
s : Finset α
t : Finset β
a : α
b c : β
h : Set.EqOn f g ↑s
a✝ : β
⊢ a✝ ∈ image f s ↔ a✝ ∈ image g s
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f g : α → β
s : Finset α
t : Finset β
a : α
b c : β
h : Set.EqOn f g ↑s
a✝ : β
⊢ (∃ x, ∃ (_ : x ∈ s), f x = a✝) ↔ ∃ x, ∃ (_ : x ∈ s), g x = a✝
tactic: simp_rw [mem_image, ← bex_def]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f g : α → β
s : Finset α
t : Finset β
a : α
b c : β
h : Set.EqOn f g ↑s
a✝ : β
⊢ (∃ x, ∃ (_ : x ∈ s), f x = a✝) ↔ ∃ x, ∃ (_ : x ∈ s), g x = a✝
state_after: no goals
tactic: exact exists₂_congr fun x hx => by rw [h hx]
Theorem: closure_smul₀
File: Mathlib/Topology/Algebra/ConstMulAction.lean

Proof steps:
state_before: M : Type u_1
α : Type u_2
β : Type u_3
G₀ : Type u_4
inst✝⁹ : TopologicalSpace α
inst✝⁸ : GroupWithZero G₀
inst✝⁷ : MulAction G₀ α
inst✝⁶ : ContinuousConstSMul G₀ α
inst✝⁵ : TopologicalSpace β
f : β → α
b : β
c✝ : G₀
s✝ : Set β
E : Type u_5
inst✝⁴ : Zero E
inst✝³ : MulActionWithZero G₀ E
inst✝² : TopologicalSpace E
inst✝¹ : T1Space E
inst✝ : ContinuousConstSMul G₀ E
c : G₀
s : Set E
⊢ closure (c • s) = c • closure s
state_after: case inl
M : Type u_1
α : Type u_2
β : Type u_3
G₀ : Type u_4
inst✝⁹ : TopologicalSpace α
inst✝⁸ : GroupWithZero G₀
inst✝⁷ : MulAction G₀ α
inst✝⁶ : ContinuousConstSMul G₀ α
inst✝⁵ : TopologicalSpace β
f : β → α
b : β
c : G₀
s✝ : Set β
E : Type u_5
inst✝⁴ : Zero E
inst✝³ : MulActionWithZero G₀ E
inst✝² : TopologicalSpace E
inst✝¹ : T1Space E
inst✝ : ContinuousConstSMul G₀ E
s : Set E
⊢ closure (0 • s) = 0 • closure s

case inr
M : Type u_1
α : Type u_2
β : Type u_3
G₀ : Type u_4
inst✝⁹ : TopologicalSpace α
inst✝⁸ : GroupWithZero G₀
inst✝⁷ : MulAction G₀ α
inst✝⁶ : ContinuousConstSMul G₀ α
inst✝⁵ : TopologicalSpace β
f : β → α
b : β
c✝ : G₀
s✝ : Set β
E : Type u_5
inst✝⁴ : Zero E
inst✝³ : MulActionWithZero G₀ E
inst✝² : TopologicalSpace E
inst✝¹ : T1Space E
inst✝ : ContinuousConstSMul G₀ E
c : G₀
s : Set E
hc : c ≠ 0
⊢ closure (c • s) = c • closure s
tactic: rcases eq_or_ne c 0 with (rfl | hc)
Theorem: MeasureTheory.sum_measure_le_measure_univ
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, NullMeasurableSet (t i) μ
H : (↑s).Pairwise (AEDisjoint μ on t)
⊢ ∑ i ∈ s, μ (t i) ≤ μ univ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, NullMeasurableSet (t i) μ
H : (↑s).Pairwise (AEDisjoint μ on t)
⊢ μ (⋃ b ∈ s, t b) ≤ μ univ
tactic: rw [← measure_biUnion_finset₀ H h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
s : Finset ι
t : ι → Set α
h : ∀ i ∈ s, NullMeasurableSet (t i) μ
H : (↑s).Pairwise (AEDisjoint μ on t)
⊢ μ (⋃ b ∈ s, t b) ≤ μ univ
state_after: no goals
tactic: exact measure_mono (subset_univ _)
Theorem: gramSchmidt_orthonormal
File: Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
ι : Type u_3
inst✝² : LinearOrder ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
f : ι → E
h₀ : LinearIndependent 𝕜 f
⊢ Orthonormal 𝕜 (gramSchmidtNormed 𝕜 f)
state_after: 𝕜 : Type u_1
E : Type u_2
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
ι : Type u_3
inst✝² : LinearOrder ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
f : ι → E
h₀ : LinearIndependent 𝕜 f
⊢ (∀ (i : ι), ‖gramSchmidtNormed 𝕜 f i‖ = 1) ∧
    Pairwise fun i j => ⟪gramSchmidtNormed 𝕜 f i, gramSchmidtNormed 𝕜 f j⟫_𝕜 = 0
tactic: unfold Orthonormal
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
ι : Type u_3
inst✝² : LinearOrder ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
f : ι → E
h₀ : LinearIndependent 𝕜 f
⊢ (∀ (i : ι), ‖gramSchmidtNormed 𝕜 f i‖ = 1) ∧
    Pairwise fun i j => ⟪gramSchmidtNormed 𝕜 f i, gramSchmidtNormed 𝕜 f j⟫_𝕜 = 0
state_after: case left
𝕜 : Type u_1
E : Type u_2
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
ι : Type u_3
inst✝² : LinearOrder ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
f : ι → E
h₀ : LinearIndependent 𝕜 f
⊢ ∀ (i : ι), ‖gramSchmidtNormed 𝕜 f i‖ = 1

case right
𝕜 : Type u_1
E : Type u_2
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
ι : Type u_3
inst✝² : LinearOrder ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
f : ι → E
h₀ : LinearIndependent 𝕜 f
⊢ Pairwise fun i j => ⟪gramSchmidtNormed 𝕜 f i, gramSchmidtNormed 𝕜 f j⟫_𝕜 = 0
tactic: constructor
Theorem: exists_isIdempotentElem_eq_of_ker_isNilpotent
File: Mathlib/RingTheory/Idempotents.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
h : ∀ x ∈ RingHom.ker f, IsNilpotent x
e : S
he : e ∈ f.range
he' : IsIdempotentElem e
⊢ ∃ e', IsIdempotentElem e' ∧ f e' = e
state_after: no goals
tactic: simpa using exists_isIdempotentElem_mul_eq_zero_of_ker_isNilpotent f h e he he' 0 .zero (by simp)
Theorem: Zsqrtd.le_arch
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℕ
a : ℤ√↑d
⊢ ∃ n, a ≤ ↑n
state_after: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ ∃ n, a ≤ ↑n
tactic: obtain ⟨x, y, (h : a ≤ ⟨x, y⟩)⟩ : ∃ x y : ℕ, Nonneg (⟨x, y⟩ + -a) :=
    match -a with
    | ⟨Int.ofNat x, Int.ofNat y⟩ => ⟨0, 0, by trivial⟩
    | ⟨Int.ofNat x, -[y+1]⟩ => ⟨0, y + 1, by simp [add_def, Int.negSucc_coe, add_assoc]; trivial⟩
    | ⟨-[x+1], Int.ofNat y⟩ => ⟨x + 1, 0, by simp [Int.negSucc_coe, add_assoc]; trivial⟩
    | ⟨-[x+1], -[y+1]⟩ => ⟨x + 1, y + 1, by simp [Int.negSucc_coe, add_assoc]; trivial⟩
state_before: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ ∃ n, a ≤ ↑n
state_after: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ { re := ↑x, im := ↑y } ≤ ↑(x + d * y)
tactic: refine ⟨x + d * y, h.trans ?_⟩
state_before: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ { re := ↑x, im := ↑y } ≤ ↑(x + d * y)
state_after: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ { re := ↑x + ↑d * ↑y - ↑x, im := 0 - ↑y }.Nonneg
tactic: change Nonneg ⟨↑x + d * y - ↑x, 0 - ↑y⟩
state_before: case intro.intro
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑y }
⊢ { re := ↑x + ↑d * ↑y - ↑x, im := 0 - ↑y }.Nonneg
state_after: case intro.intro.zero
d : ℕ
a : ℤ√↑d
x : ℕ
h : a ≤ { re := ↑x, im := ↑0 }
⊢ { re := ↑x + ↑d * ↑0 - ↑x, im := 0 - ↑0 }.Nonneg

case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑(y + 1) }
⊢ { re := ↑x + ↑d * ↑(y + 1) - ↑x, im := 0 - ↑(y + 1) }.Nonneg
tactic: cases' y with y
state_before: case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h : a ≤ { re := ↑x, im := ↑(y + 1) }
⊢ { re := ↑x + ↑d * ↑(y + 1) - ↑x, im := 0 - ↑(y + 1) }.Nonneg
state_after: case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h✝ : a ≤ { re := ↑x, im := ↑(y + 1) }
h : ∀ (y : ℕ), SqLe y d (d * y) 1
⊢ { re := ↑x + ↑d * ↑(y + 1) - ↑x, im := 0 - ↑(y + 1) }.Nonneg
tactic: have h : ∀ y, SqLe y d (d * y) 1 := fun y => by
    simpa [SqLe, mul_comm, mul_left_comm] using Nat.mul_le_mul_right (y * y) (Nat.le_mul_self d)
state_before: case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h✝ : a ≤ { re := ↑x, im := ↑(y + 1) }
h : ∀ (y : ℕ), SqLe y d (d * y) 1
⊢ { re := ↑x + ↑d * ↑(y + 1) - ↑x, im := 0 - ↑(y + 1) }.Nonneg
state_after: case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h✝ : a ≤ { re := ↑x, im := ↑(y + 1) }
h : ∀ (y : ℕ), SqLe y d (d * y) 1
⊢ { re := ↑d * ↑y.succ, im := 0 - ↑(y + 1) }.Nonneg
tactic: rw [show (x : ℤ) + d * Nat.succ y - x = d * Nat.succ y by simp]
state_before: case intro.intro.succ
d : ℕ
a : ℤ√↑d
x y : ℕ
h✝ : a ≤ { re := ↑x, im := ↑(y + 1) }
h : ∀ (y : ℕ), SqLe y d (d * y) 1
⊢ { re := ↑d * ↑y.succ, im := 0 - ↑(y + 1) }.Nonneg
state_after: no goals
tactic: exact h (y + 1)