ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: AddCircle.eq_coe_Ico
File: Mathlib/Topology/Instances/AddCircle.lean

Proof steps:
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝³ : LinearOrderedAddCommGroup 𝕜
inst✝² : TopologicalSpace 𝕜
inst✝¹ : OrderTopology 𝕜
p : 𝕜
hp : Fact (0 < p)
a✝ : 𝕜
inst✝ : Archimedean 𝕜
a : AddCircle p
⊢ ∃ b ∈ Ico 0 p, ↑b = a
state_after: 𝕜 : Type u_1
B : Type u_2
inst✝³ : LinearOrderedAddCommGroup 𝕜
inst✝² : TopologicalSpace 𝕜
inst✝¹ : OrderTopology 𝕜
p : 𝕜
hp : Fact (0 < p)
a✝ : 𝕜
inst✝ : Archimedean 𝕜
a : AddCircle p
b : ↑(Ico 0 (0 + p)) := (QuotientAddGroup.equivIcoMod ⋯ 0) a
⊢ ∃ b ∈ Ico 0 p, ↑b = a
tactic: let b := QuotientAddGroup.equivIcoMod hp.out 0 a
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝³ : LinearOrderedAddCommGroup 𝕜
inst✝² : TopologicalSpace 𝕜
inst✝¹ : OrderTopology 𝕜
p : 𝕜
hp : Fact (0 < p)
a✝ : 𝕜
inst✝ : Archimedean 𝕜
a : AddCircle p
b : ↑(Ico 0 (0 + p)) := (QuotientAddGroup.equivIcoMod ⋯ 0) a
⊢ ∃ b ∈ Ico 0 p, ↑b = a
state_after: no goals
tactic: exact ⟨b.1, by simpa only [zero_add] using b.2,
    (QuotientAddGroup.equivIcoMod hp.out 0).symm_apply_apply a⟩
Theorem: Finset.max'_singleton
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s : Finset α
H : s.Nonempty
x a : α
⊢ {a}.max' ⋯ = a
state_after: no goals
tactic: simp [max']
Theorem: Polynomial.one_scaleRoots
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r : R
⊢ scaleRoots 1 r = 1
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r : R
n✝ : ℕ
⊢ (scaleRoots 1 r).coeff n✝ = coeff 1 n✝
tactic: ext
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r : R
n✝ : ℕ
⊢ (scaleRoots 1 r).coeff n✝ = coeff 1 n✝
state_after: no goals
tactic: simp
Theorem: WeierstrassCurve.Jacobian.neg_equiv
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
P Q : Fin 3 → R
h : P ≈ Q
⊢ W'.neg P ≈ W'.neg Q
state_after: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ W'.neg ((fun m => m • Q) u) ≈ W'.neg Q
tactic: rcases h with ⟨u, rfl⟩
state_before: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ W'.neg ((fun m => m • Q) u) ≈ W'.neg Q
state_after: no goals
tactic: exact neg_smul_equiv Q u.isUnit
Theorem: Subalgebra.finrank_sup_eq_finrank_left_mul_finrank_of_free
File: Mathlib/Algebra/Algebra/Subalgebra/Rank.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝⁶ : CommRing R
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
A B : Subalgebra R S
inst✝³ : Module.Free R ↥A
inst✝² : Module.Free R ↥B
inst✝¹ : Module.Free ↥A ↥(Algebra.adjoin ↥A ↑B)
inst✝ : Module.Free ↥B ↥(Algebra.adjoin ↥B ↑A)
⊢ finrank R ↥(A ⊔ B) = finrank R ↥A * finrank ↥A ↥(Algebra.adjoin ↥A ↑B)
state_after: no goals
tactic: simpa only [map_mul] using congr(Cardinal.toNat $(rank_sup_eq_rank_left_mul_rank_of_free A B))
Theorem: AlgebraicGeometry.Scheme.emptyTo_val_c_app
File: Mathlib/AlgebraicGeometry/Limits.lean

Proof steps:
state_before: X : Scheme
⊢ Continuous fun x => PEmpty.elim x
state_after: no goals
tactic: fun_prop
Theorem: Zsqrtd.divides_sq_eq_zero
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℕ
h : x * x = d * y * y
g : ℕ := x.gcd y
gpos : g > 0
⊢ False
state_after: d : ℕ
dnsq : Nonsquare d
x y : ℕ
h : x * x = d * y * y
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
co : m.Coprime n
hx : x = m * g
hy : y = n * g
⊢ False
tactic: let ⟨m, n, co, (hx : x = m * g), (hy : y = n * g)⟩ := Nat.exists_coprime _ _
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℕ
h : x * x = d * y * y
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
co : m.Coprime n
hx : x = m * g
hy : y = n * g
⊢ False
state_after: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
⊢ False
tactic: rw [hx, hy] at h
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
⊢ False
state_after: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
this : m * m = d * (n * n)
⊢ False
tactic: have : m * m = d * (n * n) := by
        refine mul_left_cancel₀ (mul_pos gpos gpos).ne' ?_
        -- Porting note: was `simpa [mul_comm, mul_left_comm] using h`
        calc
          g * g * (m * m)
          _ = m * g * (m * g) := by ring
          _ = d * (n * g) * (n * g) := h
          _ = g * g * (d * (n * n)) := by ring
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
this : m * m = d * (n * n)
⊢ False
state_after: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
this : m * m = d * (n * n)
co2 : (m * m).Coprime (n * n)
⊢ False
tactic: have co2 :=
        let co1 := co.mul_right co
        co1.mul co1
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℕ
g : ℕ := x.gcd y
gpos : g > 0
m n : ℕ
h : m * g * (m * g) = d * (n * g) * (n * g)
co : m.Coprime n
hx : x = m * g
hy : y = n * g
this : m * m = d * (n * n)
co2 : (m * m).Coprime (n * n)
⊢ False
state_after: no goals
tactic: exact
        Nonsquare.ns d m
          (Nat.dvd_antisymm (by rw [this]; apply dvd_mul_right) <|
            co2.dvd_of_dvd_mul_right <| by simp [this])
Theorem: TensorProduct.exists_finsupp_left
File: Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : Module R M
inst✝ : Module R N
M₁ M₂ : Submodule R M
N₁ N₂ : Submodule R N
x : M ⊗[R] N
⊢ ∃ S, x = S.sum fun m n => m ⊗ₜ[R] n
state_after: no goals
tactic: induction x with
  | zero => exact ⟨0, by simp⟩
  | tmul x y => exact ⟨Finsupp.single x y, by simp⟩
  | add x y hx hy =>
    obtain ⟨Sx, hx⟩ := hx
    obtain ⟨Sy, hy⟩ := hy
    use Sx + Sy
    rw [hx, hy]
    exact (Finsupp.sum_add_index' (by simp) TensorProduct.tmul_add).symm
Theorem: Real.logb_div_base
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

Proof steps:
state_before: b✝ x y a b : ℝ
h₁ : a ≠ 0
h₂ : b ≠ 0
c : ℝ
⊢ logb (a / b) c = ((logb a c)⁻¹ - (logb b c)⁻¹)⁻¹
state_after: no goals
tactic: rw [← inv_logb_div_base h₁ h₂ c, inv_inv]
Theorem: vadd_eq_vadd_iff_neg_add_eq_vsub
File: Mathlib/Algebra/AddTorsor.lean

Proof steps:
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
v₁ v₂ : G
p₁ p₂ : P
⊢ v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ -v₁ + v₂ = p₁ -ᵥ p₂
state_after: no goals
tactic: rw [eq_vadd_iff_vsub_eq, vadd_vsub_assoc, ← add_right_inj (-v₁), neg_add_cancel_left, eq_comm]
Theorem: SSet.horn.face_coe
File: Mathlib/AlgebraicTopology/SimplicialSet.lean

Proof steps:
state_before: n : ℕ
i j : Fin (n + 2)
h : j ≠ i
⊢ Set.range ⇑(asOrderHom ((standardSimplex.objEquiv [n + 1] (op [n])).symm (δ j))) ∪ {i} ≠ Set.univ
state_after: no goals
tactic: simpa [← Set.univ_subset_iff, Set.subset_def, asOrderHom, SimplexCategory.δ, not_or,
      standardSimplex.objEquiv, asOrderHom, Equiv.ulift]
Theorem: Monoid.exponent_min'
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ exponent G ≤ n
state_after: G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ Nat.find ?hc ≤ n

case hc
G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ ExponentExists G
tactic: rw [exponent, dif_pos]
Theorem: Order.Ideal.IsProper.not_mem_or_compl_not_mem
File: Mathlib/Order/Ideal.lean

Proof steps:
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
⊢ x ∉ I ∨ xᶜ ∉ I
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
h : xᶜ ∈ I → x ∉ I
⊢ x ∉ I ∨ xᶜ ∉ I
tactic: have h : xᶜ ∈ I → x ∉ I := hI.not_mem_of_compl_mem
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
h : xᶜ ∈ I → x ∉ I
⊢ x ∉ I ∨ xᶜ ∉ I
state_after: no goals
tactic: tauto
Theorem: InnerProductSpace.Core.inner_zero_right
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ ⟪x, 0⟫_𝕜 = 0
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ (starRingEnd 𝕜) 0 = 0
tactic: rw [← inner_conj_symm, inner_zero_left]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ (starRingEnd 𝕜) 0 = 0
state_after: no goals
tactic: simp only [RingHom.map_zero]
Theorem: Stream'.WSeq.toList_ofList
File: Mathlib/Data/Seq/WSeq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ l ∈ (↑l).toList
state_after: case nil
α : Type u
β : Type v
γ : Type w
⊢ [] ∈ (↑[]).toList

case cons
α : Type u
β : Type v
γ : Type w
a : α
l : List α
IH : l ∈ (↑l).toList
⊢ a :: l ∈ (↑(a :: l)).toList
tactic: induction' l with a l IH
Theorem: Nat.factorizationLCMRight_dvd_right
File: Mathlib/Data/Nat/Factorization/Basic.lean

Proof steps:
state_before: a b m n p : ℕ
⊢ a.factorizationLCMRight b ∣ b
state_after: case inl
b m n p : ℕ
⊢ factorizationLCMRight 0 b ∣ b

case inr
a b m n p : ℕ
ha : a ≠ 0
⊢ a.factorizationLCMRight b ∣ b
tactic: rcases eq_or_ne a 0 with rfl | ha
state_before: case inr
a b m n p : ℕ
ha : a ≠ 0
⊢ a.factorizationLCMRight b ∣ b
state_after: case inr.inl
a m n p : ℕ
ha : a ≠ 0
⊢ a.factorizationLCMRight 0 ∣ 0

case inr.inr
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a.factorizationLCMRight b ∣ b
tactic: rcases eq_or_ne b 0 with rfl | hb
state_before: case inr.inr
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a.factorizationLCMRight b ∣ b
state_after: case inr.inr
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a.factorizationLCMRight b ∣ b.factorization.prod fun x x_1 => x ^ x_1
tactic: nth_rewrite 2 [← factorization_prod_pow_eq_self hb]
state_before: case inr.inr
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a.factorizationLCMRight b ∣ b.factorization.prod fun x x_1 => x ^ x_1
state_after: case inr.inr
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a.factorizationLCMRight b ∣ ∏ x ∈ (a.lcm b).factorization.support, x ^ b.factorization x

case inr.inr.hs
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ b.factorization.support ⊆ (a.lcm b).factorization.support

case inr.inr.h
a b m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ ∀ i ∈ (a.lcm b).factorization.support, i ^ 0 = 1
tactic: rw [prod_of_support_subset (s := (lcm a b).factorization.support)]
Theorem: Finset.Colex.toColex_lt_toColex
File: Mathlib/Combinatorics/Colex.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
⊢ { ofColex := s } < { ofColex := t } ↔ s ≠ t ∧ ∀ ⦃a : α⦄, a ∈ s → a ∉ t → ∃ b ∈ t, b ∉ s ∧ a ≤ b
state_after: no goals
tactic: simp [lt_iff_le_and_ne, toColex_le_toColex, and_comm]
Theorem: CategoryTheory.InjectiveResolution.self_cocomplex
File: Mathlib/CategoryTheory/Preadditive/InjectiveResolution.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
Z : C
I : InjectiveResolution Z
inst✝ : Injective Z
n : ℕ
⊢ Injective (((single₀ C).obj Z).X n)
state_after: case zero
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
Z : C
I : InjectiveResolution Z
inst✝ : Injective Z
⊢ Injective (((single₀ C).obj Z).X 0)

case succ
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
Z : C
I : InjectiveResolution Z
inst✝ : Injective Z
n✝ : ℕ
⊢ Injective (((single₀ C).obj Z).X (n✝ + 1))
tactic: cases n
Theorem: FirstOrder.Language.funMap_quotient_mk'
File: Mathlib/ModelTheory/Quotients.lean

Proof steps:
state_before: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
f : L.Functions n
x : Fin n → M
⊢ (funMap f fun i => ⟦x i⟧) = ⟦funMap f x⟧
state_after: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
f : L.Functions n
x : Fin n → M
⊢ Quotient.map (funMap f) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) = ⟦funMap f x⟧
tactic: change
    Quotient.map (@funMap L M ps.toStructure n f) Prestructure.fun_equiv (Quotient.finChoice _) =
      _
state_before: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
f : L.Functions n
x : Fin n → M
⊢ Quotient.map (funMap f) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) = ⟦funMap f x⟧
state_after: no goals
tactic: rw [Quotient.finChoice_eq, Quotient.map_mk]
Theorem: Path.map_map
File: Mathlib/Topology/Connected/PathConnected.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ γ : Path x y
Z : Type u_4
inst✝ : TopologicalSpace Z
f : X → Y
hf : Continuous f
g : Y → Z
hg : Continuous g
⊢ (γ.map hf).map hg = γ.map ⋯
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ γ : Path x y
Z : Type u_4
inst✝ : TopologicalSpace Z
f : X → Y
hf : Continuous f
g : Y → Z
hg : Continuous g
x✝ : ↑I
⊢ ((γ.map hf).map hg) x✝ = (γ.map ⋯) x✝
tactic: ext
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ γ : Path x y
Z : Type u_4
inst✝ : TopologicalSpace Z
f : X → Y
hf : Continuous f
g : Y → Z
hg : Continuous g
x✝ : ↑I
⊢ ((γ.map hf).map hg) x✝ = (γ.map ⋯) x✝
state_after: no goals
tactic: rfl
Theorem: _private.Mathlib.SetTheory.Ordinal.Notation.0.ONote.exists_lt_add
File: Mathlib/SetTheory/Ordinal/Notation.lean

Proof steps:
state_before: α : Sort u_1
hα : Nonempty α
o : Ordinal.{u_2}
f : α → Ordinal.{u_2}
H : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i
b a : Ordinal.{u_2}
h : a < b + o
⊢ ∃ i, a < b + f i
state_after: case inl
α : Sort u_1
hα : Nonempty α
o : Ordinal.{u_2}
f : α → Ordinal.{u_2}
H : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i
b a : Ordinal.{u_2}
h✝ : a < b + o
h : a < b
⊢ ∃ i, a < b + f i

case inr
α : Sort u_1
hα : Nonempty α
o : Ordinal.{u_2}
f : α → Ordinal.{u_2}
H : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i
b a : Ordinal.{u_2}
h : a < b + o
h' : b ≤ a
⊢ ∃ i, a < b + f i
tactic: cases' lt_or_le a b with h h'
Theorem: Matrix.inv_mul_eq_iff_eq_mul_of_invertible
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

Proof steps:
state_before: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : CommRing α
A✝ B✝ A B C : Matrix n n α
inst✝ : Invertible A
h : A⁻¹ * B = C
⊢ B = A * C
state_after: no goals
tactic: rw [← h, mul_inv_cancel_left_of_invertible]
state_before: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : CommRing α
A✝ B✝ A B C : Matrix n n α
inst✝ : Invertible A
h : B = A * C
⊢ A⁻¹ * B = C
state_after: no goals
tactic: rw [h, inv_mul_cancel_left_of_invertible]
Theorem: Polynomial.map_div
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

Proof steps:
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : Field k
f : R →+* k
⊢ map f (p / q) = map f p / map f q
state_after: no goals
tactic: if hq0 : q = 0 then simp [hq0]
  else
    rw [div_def, div_def, Polynomial.map_mul, map_divByMonic f (monic_mul_leadingCoeff_inv hq0),
      Polynomial.map_mul, map_C, leadingCoeff_map, map_inv₀]
Theorem: le_iff_eq_sup_sdiff
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y = z ⊔ y \ x
state_after: case a
α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y ≤ z ⊔ y \ x

case a
α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ z ⊔ y \ x ≤ y
tactic: apply le_antisymm
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : y = z ⊔ y \ x
⊢ x ≤ z
state_after: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ≤ z
tactic: conv_lhs at H => rw [← sup_sdiff_cancel_right hx]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ≤ z
state_after: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ⊓ y \ x ≤ z ⊓ y \ x
tactic: refine le_of_inf_le_sup_le ?_ H.le
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ⊓ y \ x ≤ z ⊓ y \ x
state_after: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ ⊥ ≤ z ⊓ y \ x
tactic: rw [inf_sdiff_self_right]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ ⊥ ≤ z ⊓ y \ x
state_after: no goals
tactic: exact bot_le
Theorem: Set.wellFoundedOn_univ
File: Mathlib/Order/WellFoundedSet.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r r' : α → α → Prop
f : β → α
s t : Set α
x y : α
⊢ univ.WellFoundedOn r ↔ WellFounded r
state_after: no goals
tactic: simp [wellFoundedOn_iff]
Theorem: MeasureTheory.IsStoppingTime.max
File: Mathlib/Probability/Process/Stopping.lean

Proof steps:
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
⊢ IsStoppingTime f fun ω => max (τ ω) (π ω)
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet {ω | (fun ω => max (τ ω) (π ω)) ω ≤ i}
tactic: intro i
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet {ω | (fun ω => max (τ ω) (π ω)) ω ≤ i}
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet ({a | τ a ≤ i} ∩ {a | π a ≤ i})
tactic: simp_rw [max_le_iff, Set.setOf_and]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet ({a | τ a ≤ i} ∩ {a | π a ≤ i})
state_after: no goals
tactic: exact (hτ i).inter (hπ i)
Theorem: dist_indicator
File: Mathlib/Analysis/Normed/Group/Basic.lean

Proof steps:
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s✝ : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
s t : Set α
f : α → E
x : α
⊢ dist (s.mulIndicator f x) (t.mulIndicator f x) = ‖(s ∆ t).mulIndicator f x‖
state_after: no goals
tactic: rw [dist_eq_norm_div, Set.apply_mulIndicator_symmDiff norm_inv']
Theorem: InnerProductGeometry.angle_self_neg_of_nonzero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
hx : x ≠ 0
⊢ angle x (-x) = π
state_after: no goals
tactic: rw [angle_neg_right, angle_self hx, sub_zero]
Theorem: Primrec.optionToList
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
o : Option α
⊢ (Option.casesOn (id o) [] fun b => [id b]) = o.toList
state_after: no goals
tactic: rcases o <;> simp
Theorem: Matroid.restrict_eq_restrict_iff
File: Mathlib/Data/Matroid/Restrict.lean

Proof steps:
state_before: α : Type u_1
M✝ : Matroid α
R I J X✝ Y : Set α
M M' : Matroid α
X : Set α
⊢ M ↾ X = M' ↾ X ↔ ∀ I ⊆ X, M.Indep I ↔ M'.Indep I
state_after: case refine_1
α : Type u_1
M✝ : Matroid α
R I✝ J X✝ Y : Set α
M M' : Matroid α
X : Set α
h : M ↾ X = M' ↾ X
I : Set α
hIX : I ⊆ X
⊢ M.Indep I ↔ M'.Indep I

case refine_2
α : Type u_1
M✝ : Matroid α
R I✝ J X✝ Y : Set α
M M' : Matroid α
X : Set α
h : ∀ I ⊆ X, M.Indep I ↔ M'.Indep I
I : Set α
hI : I ⊆ X
⊢ (M ↾ X).Indep I ↔ (M' ↾ X).Indep I
tactic: refine ⟨fun h I hIX ↦ ?_, fun h ↦ eq_of_indep_iff_indep_forall rfl fun I (hI : I ⊆ X) ↦ ?_⟩
state_before: case refine_2
α : Type u_1
M✝ : Matroid α
R I✝ J X✝ Y : Set α
M M' : Matroid α
X : Set α
h : ∀ I ⊆ X, M.Indep I ↔ M'.Indep I
I : Set α
hI : I ⊆ X
⊢ (M ↾ X).Indep I ↔ (M' ↾ X).Indep I
state_after: no goals
tactic: rw [restrict_indep_iff, and_iff_left hI, restrict_indep_iff, and_iff_left hI, h _ hI]
Theorem: Polynomial.nmem_nonZeroDivisors_iff
File: Mathlib/Algebra/Polynomial/RingDivision.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
⊢ P ∉ R[X]⁰ ↔ ∃ a, a ≠ 0 ∧ a • P = 0
state_after: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
⊢ ∃ a, a ≠ 0 ∧ a • P = 0
tactic: refine ⟨fun hP ↦ ?_, fun ⟨a, ha, h⟩ h1 ↦ ha <| C_eq_zero.1 <| (h1 _) <| smul_eq_C_mul a ▸ h⟩
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
⊢ ∃ a, a ≠ 0 ∧ a • P = 0
state_after: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
⊢ False
tactic: by_contra! h
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
⊢ False
state_after: case intro
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
⊢ False
tactic: obtain ⟨Q, hQ⟩ := _root_.nmem_nonZeroDivisors_iff.1 hP
state_before: case intro
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
⊢ False
state_after: case intro
R : Type u
S : Type v
T : Type w
a✝¹ b : R
n : ℕ
inst✝ : CommSemiring R
a✝ p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
a : R
ha : a • P = 0
⊢ a = 0
tactic: refine hQ.2 (eq_zero_of_mul_eq_zero_of_smul P (fun a ha ↦ ?_) Q (mul_comm P _ ▸ hQ.1))
state_before: case intro
R : Type u
S : Type v
T : Type w
a✝¹ b : R
n : ℕ
inst✝ : CommSemiring R
a✝ p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
a : R
ha : a • P = 0
⊢ a = 0
state_after: case intro
R : Type u
S : Type v
T : Type w
a✝¹ b : R
n : ℕ
inst✝ : CommSemiring R
a✝ p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
a : R
ha : a ≠ 0
⊢ a • P ≠ 0
tactic: contrapose! ha
state_before: case intro
R : Type u
S : Type v
T : Type w
a✝¹ b : R
n : ℕ
inst✝ : CommSemiring R
a✝ p P : R[X]
hP : P ∉ R[X]⁰
h : ∀ (a : R), a ≠ 0 → a • P ≠ 0
Q : R[X]
hQ : Q ∈ {s | s * P = 0 ∧ s ≠ 0}
a : R
ha : a ≠ 0
⊢ a • P ≠ 0
state_after: no goals
tactic: exact h a ha