ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: GaloisConnection.l_iSup
File: Mathlib/Order/GaloisConnection.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a a₁ a₂ : α
b b₁ b₂ : β
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
l : α → β
u : β → α
gc : GaloisConnection l u
f : ι → α
⊢ IsLUB (range (l ∘ f)) (l (iSup f))
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a a₁ a₂ : α
b b₁ b₂ : β
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
l : α → β
u : β → α
gc : GaloisConnection l u
f : ι → α
⊢ IsLUB (l '' range f) (l (sSup (range f)))
tactic: rw [range_comp, ← sSup_range]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a a₁ a₂ : α
b b₁ b₂ : β
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
l : α → β
u : β → α
gc : GaloisConnection l u
f : ι → α
⊢ IsLUB (l '' range f) (l (sSup (range f)))
state_after: no goals
tactic: exact gc.isLUB_l_image (isLUB_sSup _)
Theorem: prod_eq_generateFrom
File: Mathlib/Topology/Constructions.lean

Proof steps:
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
t : Set X
ht : t ∈ inst✝⁵.1
⊢ IsOpen t ∧ IsOpen univ ∧ Prod.fst ⁻¹' t = t ×ˢ univ
state_after: no goals
tactic: simpa [Set.prod_eq] using ht
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
t : Set Y
ht : t ∈ inst✝⁴.1
⊢ IsOpen univ ∧ IsOpen t ∧ Prod.snd ⁻¹' t = univ ×ˢ t
state_after: no goals
tactic: simpa [Set.prod_eq] using ht
Theorem: hasSum_geometric_of_lt_one
File: Mathlib/Analysis/SpecificLimits/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
r : ℝ
h₁ : 0 ≤ r
h₂ : r < 1
this✝ : r ≠ 1
this : Tendsto (fun n => (r ^ n - 1) * (r - 1)⁻¹) atTop (𝓝 ((0 - 1) * (r - 1)⁻¹))
⊢ Tendsto (fun n => ∑ i ∈ Finset.range n, r ^ i) atTop (𝓝 (1 - r)⁻¹)
state_after: no goals
tactic: simp_all [neg_inv, geom_sum_eq, div_eq_mul_inv]
Theorem: Pell.eq_of_xn_modEq_lem2
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
n : ℕ
h : 2 * xn a1 n = xn a1 (n + 1)
⊢ a = 2 ∧ n = 0
state_after: a : ℕ
a1 : 1 < a
n : ℕ
h : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n
⊢ a = 2 ∧ n = 0
tactic: rw [xn_succ, mul_comm] at h
state_before: a : ℕ
a1 : 1 < a
n : ℕ
h : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n
⊢ a = 2 ∧ n = 0
state_after: a : ℕ
a1 : 1 < a
n : ℕ
h : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n
this : n = 0
⊢ a = 2 ∧ n = 0
tactic: have : n = 0 :=
    n.eq_zero_or_pos.resolve_right fun np =>
      _root_.ne_of_lt
        (lt_of_le_of_lt (Nat.mul_le_mul_left _ a1)
          (Nat.lt_add_of_pos_right <| mul_pos (d_pos a1) (strictMono_y a1 np)))
        h
state_before: a : ℕ
a1 : 1 < a
n : ℕ
h : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n
this : n = 0
⊢ a = 2 ∧ n = 0
state_after: case refl
a : ℕ
a1 : 1 < a
h : xn a1 0 * 2 = xn a1 0 * a + Pell.d a1 * yn a1 0
⊢ a = 2 ∧ 0 = 0
tactic: cases this
state_before: case refl
a : ℕ
a1 : 1 < a
h : xn a1 0 * 2 = xn a1 0 * a + Pell.d a1 * yn a1 0
⊢ a = 2 ∧ 0 = 0
state_after: case refl
a : ℕ
a1 : 1 < a
h : 2 = a
⊢ a = 2 ∧ 0 = 0
tactic: simp at h
state_before: case refl
a : ℕ
a1 : 1 < a
h : 2 = a
⊢ a = 2 ∧ 0 = 0
state_after: no goals
tactic: exact ⟨h.symm, rfl⟩
Theorem: HurwitzZeta.hasSum_nat_cosZeta
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

Proof steps:
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
⊢ HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (cosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
this :
  HasSum (fun n => cexp (2 * ↑π * I * ↑a * ↑↑n) / ↑|↑n| ^ s / 2 + cexp (2 * ↑π * I * ↑a * ↑(-↑n)) / ↑|(-↑n)| ^ s / 2)
    (cosZeta (↑a) s + cexp (2 * ↑π * I * ↑a * ↑0) / ↑|0| ^ s / 2)
⊢ HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (cosZeta (↑a) s)
tactic: have := (hasSum_int_cosZeta a hs).nat_add_neg
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
this :
  HasSum (fun n => cexp (2 * ↑π * I * ↑a * ↑↑n) / ↑|↑n| ^ s / 2 + cexp (2 * ↑π * I * ↑a * ↑(-↑n)) / ↑|(-↑n)| ^ s / 2)
    (cosZeta (↑a) s + cexp (2 * ↑π * I * ↑a * ↑0) / ↑|0| ^ s / 2)
⊢ HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (cosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
this : HasSum (fun n => (cexp (2 * ↑π * I * ↑a * ↑n) + cexp (-(2 * ↑π * I * ↑a * ↑n))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
⊢ HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (cosZeta (↑a) s)
tactic: simp_rw [abs_neg, Int.cast_neg, Nat.abs_cast, Int.cast_natCast, mul_neg, abs_zero, Int.cast_zero,
    zero_cpow (ne_zero_of_one_lt_re hs), div_zero, zero_div, add_zero, ← add_div,
    div_right_comm _ _ (2 : ℂ)] at this
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
this : HasSum (fun n => (cexp (2 * ↑π * I * ↑a * ↑n) + cexp (-(2 * ↑π * I * ↑a * ↑n))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
⊢ HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (cosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
this : HasSum (fun n => (cexp (2 * ↑π * I * ↑a * ↑n) + cexp (-(2 * ↑π * I * ↑a * ↑n))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
⊢ HasSum (fun n => (cexp (2 * ↑π * ↑a * ↑n * I) + cexp (-(2 * ↑π * ↑a * ↑n * I))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
tactic: simp_rw [push_cast, Complex.cos, neg_mul]
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
this : HasSum (fun n => (cexp (2 * ↑π * I * ↑a * ↑n) + cexp (-(2 * ↑π * I * ↑a * ↑n))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
⊢ HasSum (fun n => (cexp (2 * ↑π * ↑a * ↑n * I) + cexp (-(2 * ↑π * ↑a * ↑n * I))) / 2 / ↑n ^ s) (cosZeta (↑a) s)
state_after: no goals
tactic: exact this.congr_fun fun n ↦ by rw [show 2 * π * a * n * I = 2 * π * I * a * n by ring]
Theorem: multiplicity.eq_top_iff
File: Mathlib/RingTheory/Multiplicity.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ (∀ (n : ℕ), ¬¬a ^ (n + 1) ∣ b) ↔ ∀ (n : ℕ), a ^ n ∣ b
state_after: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ (∀ (n : ℕ), a ^ (n + 1) ∣ b) ↔ ∀ (n : ℕ), a ^ n ∣ b
tactic: simp only [Classical.not_not]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ (∀ (n : ℕ), a ^ (n + 1) ∣ b) ↔ ∀ (n : ℕ), a ^ n ∣ b
state_after: no goals
tactic: exact
      ⟨fun h n =>
        Nat.casesOn n
          (by
            rw [_root_.pow_zero]
            exact one_dvd _)
          fun n => h _,
        fun h n => h _⟩
Theorem: Nat.Iio_eq_range
File: Mathlib/Order/Interval/Finset/Nat.lean

Proof steps:
state_before: a b c : ℕ
⊢ Iio = range
state_after: case h.a
a b✝ c b x : ℕ
⊢ x ∈ Iio b ↔ x ∈ range b
tactic: ext b x
state_before: case h.a
a b✝ c b x : ℕ
⊢ x ∈ Iio b ↔ x ∈ range b
state_after: no goals
tactic: rw [mem_Iio, mem_range]
Theorem: Polynomial.hasStrictDerivAt
File: Mathlib/Analysis/Calculus/Deriv/Polynomial.lean

Proof steps:
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x✝ : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
x : 𝕜
⊢ HasStrictDerivAt (fun x => eval x p) (eval x (derivative p)) x
state_after: no goals
tactic: induction p using Polynomial.induction_on' with
  | h_add p q hp hq => simpa using hp.add hq
  | h_monomial n a => simpa [mul_assoc] using (hasStrictDerivAt_pow n x).const_mul a
Theorem: Matrix.det_one_add_col_mul_row
File: Mathlib/LinearAlgebra/Matrix/SchurComplement.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
α : Type u_4
inst✝⁷ : Fintype l
inst✝⁶ : Fintype m
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : CommRing α
ι : Type u_5
inst✝ : Unique ι
u v : m → α
⊢ (1 + col ι u * row ι v).det = 1 + v ⬝ᵥ u
state_after: no goals
tactic: rw [det_one_add_mul_comm, det_unique, Pi.add_apply, Pi.add_apply, Matrix.one_apply_eq,
    Matrix.row_mul_col_apply]
Theorem: ProbabilityTheory.condCount_inter_self
File: Mathlib/Probability/CondCount.lean

Proof steps:
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : s.Finite
⊢ (condCount s) (s ∩ t) = (condCount s) t
state_after: no goals
tactic: rw [condCount, cond_inter_self _ hs.measurableSet]
Theorem: HurwitzZeta.oddKernel_undef
File: Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean

Proof steps:
state_before: a : UnitAddCircle
x : ℝ
hx : x ≤ 0
⊢ oddKernel a x = 0
state_after: case H
x : ℝ
hx : x ≤ 0
a' : ℝ
⊢ oddKernel (↑a') x = 0
tactic: induction' a using QuotientAddGroup.induction_on' with a'
state_before: case H
x : ℝ
hx : x ≤ 0
a' : ℝ
⊢ oddKernel (↑a') x = 0
state_after: no goals
tactic: rw [← ofReal_eq_zero, oddKernel_def', jacobiTheta₂_undef, jacobiTheta₂'_undef, zero_div, zero_add,
    mul_zero, mul_zero] <;>
  rwa [I_mul_im, ofReal_re]
Theorem: Nat.primeFactorsList_sublist_right
File: Mathlib/Data/Nat/Factors.lean

Proof steps:
state_before: n k : ℕ
h : k ≠ 0
⊢ n.primeFactorsList <+ (n * k).primeFactorsList
state_after: case zero
k : ℕ
h : k ≠ 0
⊢ primeFactorsList 0 <+ (0 * k).primeFactorsList

case succ
k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+ ((hn + 1) * k).primeFactorsList
tactic: cases' n with hn
state_before: case succ
k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+ ((hn + 1) * k).primeFactorsList
state_after: k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+~ ((hn + 1) * k).primeFactorsList
tactic: apply sublist_of_subperm_of_sorted _ (primeFactorsList_sorted _) (primeFactorsList_sorted _)
state_before: k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+~ ((hn + 1) * k).primeFactorsList
state_after: k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+~ hn.succ.primeFactorsList ++ k.primeFactorsList
tactic: simp only [(perm_primeFactorsList_mul (Nat.succ_ne_zero _) h).subperm_left]
state_before: k : ℕ
h : k ≠ 0
hn : ℕ
⊢ (hn + 1).primeFactorsList <+~ hn.succ.primeFactorsList ++ k.primeFactorsList
state_after: no goals
tactic: exact (sublist_append_left _ _).subperm
Theorem: fourier_neg'
File: Mathlib/Analysis/Fourier/AddCircle.lean

Proof steps:
state_before: T : ℝ
n : ℤ
x : AddCircle T
⊢ ↑(-(n • x)).toCircle = (starRingEnd ℂ) ((fourier n) x)
state_after: T : ℝ
n : ℤ
x : AddCircle T
⊢ (fourier (-n)) x = (starRingEnd ℂ) ((fourier n) x)
tactic: rw [← neg_smul, ← fourier_apply]
state_before: T : ℝ
n : ℤ
x : AddCircle T
⊢ (fourier (-n)) x = (starRingEnd ℂ) ((fourier n) x)
state_after: no goals
tactic: exact fourier_neg
Theorem: MeasurableEmbedding.measurable_extend
File: Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
mα : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g✝ : β → γ
hf : MeasurableEmbedding f
g : α → γ
g' : β → γ
hg : Measurable g
hg' : Measurable g'
⊢ Measurable (extend f g g')
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
mα : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g✝ : β → γ
hf : MeasurableEmbedding f
g : α → γ
g' : β → γ
hg : Measurable g
hg' : Measurable g'
⊢ Measurable ((range f).restrict (extend f g g'))

case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
mα : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g✝ : β → γ
hf : MeasurableEmbedding f
g : α → γ
g' : β → γ
hg : Measurable g
hg' : Measurable g'
⊢ Measurable ((range f)ᶜ.restrict (extend f g g'))
tactic: refine measurable_of_restrict_of_restrict_compl hf.measurableSet_range ?_ ?_
Theorem: Nat.eq_properDivisors_of_subset_of_sum_eq_sum
File: Mathlib/NumberTheory/Divisors.lean

Proof steps:
state_before: n : ℕ
s : Finset ℕ
hsub : s ⊆ n.properDivisors
⊢ ∑ x ∈ s, x = ∑ x ∈ n.properDivisors, x → s = n.properDivisors
state_after: case zero
s : Finset ℕ
hsub : s ⊆ properDivisors 0
⊢ ∑ x ∈ s, x = ∑ x ∈ properDivisors 0, x → s = properDivisors 0

case succ
s : Finset ℕ
n✝ : ℕ
hsub : s ⊆ (n✝ + 1).properDivisors
⊢ ∑ x ∈ s, x = ∑ x ∈ (n✝ + 1).properDivisors, x → s = (n✝ + 1).properDivisors
tactic: cases n
state_before: case succ
s : Finset ℕ
n✝ : ℕ
hsub : s ⊆ (n✝ + 1).properDivisors
⊢ ∑ x ∈ s, x = ∑ x ∈ (n✝ + 1).properDivisors, x → s = (n✝ + 1).properDivisors
state_after: no goals
tactic: classical
    rw [← sum_sdiff hsub]
    intro h
    apply Subset.antisymm hsub
    rw [← sdiff_eq_empty_iff_subset]
    contrapose h
    rw [← Ne, ← nonempty_iff_ne_empty] at h
    apply ne_of_lt
    rw [← zero_add (∑ x ∈ s, x), ← add_assoc, add_zero]
    apply add_lt_add_right
    have hlt :=
      sum_lt_sum_of_nonempty h fun x hx => pos_of_mem_properDivisors (sdiff_subset hx)
    simp only [sum_const_zero] at hlt
    apply hlt
Theorem: integral_cos_pow
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

Proof steps:
state_before: a b : ℝ
n : ℕ
⊢ ∫ (x : ℝ) in a..b, cos x ^ (n + 2) =
    (cos b ^ (n + 1) * sin b - cos a ^ (n + 1) * sin a) / (↑n + 2) + (↑n + 1) / (↑n + 2) * ∫ (x : ℝ) in a..b, cos x ^ n
state_after: a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) * (↑n + 2) =
    cos b ^ (n + 1) * sin b - cos a ^ (n + 1) * sin a + (↑n + 1) * ∫ (x : ℝ) in a..b, cos x ^ n
tactic: field_simp
state_before: a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) * (↑n + 2) =
    cos b ^ (n + 1) * sin b - cos a ^ (n + 1) * sin a + (↑n + 1) * ∫ (x : ℝ) in a..b, cos x ^ n
state_after: case h.e'_2
a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) * (↑n + 2) =
    (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) + (↑n + 1) * ∫ (x : ℝ) in a..b, cos x ^ (n + 2)
tactic: convert eq_sub_iff_add_eq.mp (integral_cos_pow_aux n) using 1
state_before: case h.e'_2
a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) * (↑n + 2) =
    (∫ (x : ℝ) in a..b, cos x ^ (n + 2)) + (↑n + 1) * ∫ (x : ℝ) in a..b, cos x ^ (n + 2)
state_after: no goals
tactic: ring
Theorem: ContinuousMap.HomotopicRel.equivalence
File: Mathlib/Topology/Homotopy/Basic.lean

Proof steps:
state_before: F : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
S : Set X
⊢ ∀ {x y : C(X, Y)}, x.HomotopicRel y S → y.HomotopicRel x S
state_after: no goals
tactic: apply symm
state_before: F : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
S : Set X
⊢ ∀ {x y z : C(X, Y)}, x.HomotopicRel y S → y.HomotopicRel z S → x.HomotopicRel z S
state_after: no goals
tactic: apply trans
Theorem: ite_zero_add
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M✝ : Type u_4
M : Type u
inst✝¹ : MulOneClass M
P : Prop
inst✝ : Decidable P
a b : M
⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b
state_after: no goals
tactic: by_cases h : P <;> simp [h]
Theorem: Sum.map_surjective
File: Mathlib/Data/Sum/Basic.lean

Proof steps:
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h : Surjective (Sum.map f g)
c : γ
⊢ ∃ a, f a = c
state_after: case intro.inl
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h✝ : Surjective (Sum.map f g)
c : γ
a : α
h : Sum.map f g (inl a) = inl c
⊢ ∃ a, f a = c

case intro.inr
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h✝ : Surjective (Sum.map f g)
c : γ
b : β
h : Sum.map f g (inr b) = inl c
⊢ ∃ a, f a = c
tactic: obtain ⟨a | b, h⟩ := h (inl c)
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h : Surjective (Sum.map f g)
d : δ
⊢ ∃ a, g a = d
state_after: case intro.inl
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h✝ : Surjective (Sum.map f g)
d : δ
a : α
h : Sum.map f g (inl a) = inr d
⊢ ∃ a, g a = d

case intro.inr
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
f : α → γ
g : β → δ
h✝ : Surjective (Sum.map f g)
d : δ
b : β
h : Sum.map f g (inr b) = inr d
⊢ ∃ a, g a = d
tactic: obtain ⟨a | b, h⟩ := h (inr d)
Theorem: egauge_zero_right
File: Mathlib/Analysis/Convex/EGauge.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝² : NormedDivisionRing 𝕜
α : Type u_2
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
c : 𝕜
s t : Set E
x y : E
r : ℝ≥0∞
hs : s.Nonempty
⊢ egauge 𝕜 s 0 = 0
state_after: 𝕜 : Type u_1
inst✝² : NormedDivisionRing 𝕜
α : Type u_2
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
c : 𝕜
s t : Set E
x y : E
r : ℝ≥0∞
hs : s.Nonempty
this : 0 ∈ 0 • s
⊢ egauge 𝕜 s 0 = 0
tactic: have : 0 ∈ (0 : 𝕜) • s := by simp [zero_smul_set hs]
state_before: 𝕜 : Type u_1
inst✝² : NormedDivisionRing 𝕜
α : Type u_2
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
c : 𝕜
s t : Set E
x y : E
r : ℝ≥0∞
hs : s.Nonempty
this : 0 ∈ 0 • s
⊢ egauge 𝕜 s 0 = 0
state_after: no goals
tactic: simpa using egauge_le_of_mem_smul this
Theorem: Set.not_nontrivial_singleton
File: Mathlib/Data/Set/Subsingleton.lean

Proof steps:
state_before: α : Type u
a : α
s t : Set α
x : α
H : {x}.Nontrivial
⊢ False
state_after: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
⊢ False
tactic: rw [nontrivial_iff_exists_ne (mem_singleton x)] at H
state_before: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
⊢ False
state_after: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
y : α
hy : y ∈ {x}
hya : y ≠ x
⊢ False
tactic: let ⟨y, hy, hya⟩ := H
state_before: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
y : α
hy : y ∈ {x}
hya : y ≠ x
⊢ False
state_after: no goals
tactic: exact hya (mem_singleton_iff.1 hy)
Theorem: PerfectPairing.toDualRight_symm_comp_toDualLeft
File: Mathlib/LinearAlgebra/PerfectPairing.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : PerfectPairing R M N
⊢ ↑p.toDualRight.symm.dualMap ∘ₗ ↑p.toDualLeft = Dual.eval R M
state_after: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : PerfectPairing R M N
x : M
⊢ (↑p.toDualRight.symm.dualMap ∘ₗ ↑p.toDualLeft) x = (Dual.eval R M) x
tactic: ext1 x
state_before: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : PerfectPairing R M N
x : M
⊢ (↑p.toDualRight.symm.dualMap ∘ₗ ↑p.toDualLeft) x = (Dual.eval R M) x
state_after: no goals
tactic: exact p.toDualRight_symm_toDualLeft x
Theorem: inf_iSup₂_eq
File: Mathlib/Order/CompleteBooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : Frame α
s t : Set α
a✝ b : α
f : (i : ι) → κ i → α
a : α
⊢ a ⊓ ⨆ i, ⨆ j, f i j = ⨆ i, ⨆ j, a ⊓ f i j
state_after: no goals
tactic: simp only [inf_iSup_eq]
Theorem: DFinsupp.mem_neLocus
File: Mathlib/Data/DFinsupp/NeLocus.lean

Proof steps:
state_before: α : Type u_1
N : α → Type u_2
inst✝² : DecidableEq α
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → Zero (N a)
f✝ g✝ f g : Π₀ (a : α), N a
a : α
⊢ a ∈ f.neLocus g ↔ f a ≠ g a
state_after: no goals
tactic: simpa only [neLocus, Finset.mem_filter, Finset.mem_union, mem_support_iff,
    and_iff_right_iff_imp] using Ne.ne_or_ne _
Theorem: disjoint_compl_compl_right_iff
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : HeytingAlgebra α
a b c : α
⊢ Disjoint a bᶜᶜ ↔ Disjoint a b
state_after: no goals
tactic: simp_rw [← le_compl_iff_disjoint_right, compl_compl_compl]
Theorem: MulAction.IsBlock.isBlockSystem
File: Mathlib/GroupTheory/GroupAction/Blocks.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ IsBlockSystem G (Set.range fun g => g • B)
state_after: case nonempty
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∅ ∉ Set.range fun g => g • B

case cover
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∀ (a : X), ∃! b, (b ∈ Set.range fun g => g • B) ∧ a ∈ b

case mem_blocks
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∀ b ∈ Set.range fun g => g • B, IsBlock G b
tactic: refine ⟨⟨?nonempty, ?cover⟩, ?mem_blocks⟩
state_before: case nonempty
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∅ ∉ Set.range fun g => g • B

case cover
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∀ (a : X), ∃! b, (b ∈ Set.range fun g => g • B) ∧ a ∈ b

case mem_blocks
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∀ b ∈ Set.range fun g => g • B, IsBlock G b
state_after: case nonempty
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∅ ∉ Set.range fun g => g • B

case cover
G : Type u_1
inst✝¹ : Group G
X : Type u_2
inst✝ : MulAction G X
hGX : IsPretransitive G X
B : Set X
hB : IsBlock G B
hBe : B.Nonempty
⊢ ∀ (a : X), ∃! b, (b ∈ Set.range fun g => g • B) ∧ a ∈ b
tactic: case mem_blocks => rintro B' ⟨g, rfl⟩; exact hB.translate g
Theorem: CategoryTheory.PreservesImage.inv_comp_image_ι_map
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean

Proof steps:
state_before: A : Type u₁
B : Type u₂
inst✝⁷ : Category.{v₁, u₁} A
inst✝⁶ : Category.{v₂, u₂} B
inst✝⁵ : HasEqualizers A
inst✝⁴ : HasImages A
inst✝³ : StrongEpiCategory B
inst✝² : HasImages B
L : A ⥤ B
inst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L
inst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L
X Y : A
f : X ⟶ Y
⊢ (iso L f).inv ≫ image.ι (L.map f) = L.map (image.ι f)
state_after: no goals
tactic: simp
Theorem: Nat.NormDigits.digits_one
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n✝ b n : ℕ
n0 : 0 < n
nb : n < b
⊢ b.digits n = [n] ∧ 1 < b ∧ 0 < n
state_after: n✝ b n : ℕ
n0 : 0 < n
nb : n < b
b2 : 1 < b
⊢ b.digits n = [n] ∧ 1 < b ∧ 0 < n
tactic: have b2 : 1 < b :=
    lt_iff_add_one_le.mpr (le_trans (add_le_add_right (lt_iff_add_one_le.mp n0) 1) nb)
state_before: n✝ b n : ℕ
n0 : 0 < n
nb : n < b
b2 : 1 < b
⊢ b.digits n = [n] ∧ 1 < b ∧ 0 < n
state_after: n✝ b n : ℕ
n0 : 0 < n
nb : n < b
b2 : 1 < b
⊢ b.digits n = [n]
tactic: refine ⟨?_, b2, n0⟩
state_before: n✝ b n : ℕ
n0 : 0 < n
nb : n < b
b2 : 1 < b
⊢ b.digits n = [n]
state_after: no goals
tactic: rw [Nat.digits_def' b2 n0, Nat.mod_eq_of_lt nb,
    (Nat.div_eq_zero_iff ((zero_le n).trans_lt nb)).2 nb, Nat.digits_zero]