ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: zero_lt_one_add_norm_sq'
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₂ : ℝ
x : E
⊢ 0 < 1 + ‖x‖ ^ 2
state_after: no goals
tactic: positivity
Theorem: IsSMulRegular.of_smul_eq_one
File: Mathlib/Algebra/Regular/SMul.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
M : Type u_3
a b : R
s : S
inst✝⁴ : Monoid S
inst✝³ : SMul R M
inst✝² : SMul R S
inst✝¹ : MulAction S M
inst✝ : IsScalarTower R S M
h : a • s = 1
⊢ IsSMulRegular M (a • s)
state_after: R : Type u_1
S : Type u_2
M : Type u_3
a b : R
s : S
inst✝⁴ : Monoid S
inst✝³ : SMul R M
inst✝² : SMul R S
inst✝¹ : MulAction S M
inst✝ : IsScalarTower R S M
h : a • s = 1
⊢ IsSMulRegular M 1
tactic: rw [h]
state_before: R : Type u_1
S : Type u_2
M : Type u_3
a b : R
s : S
inst✝⁴ : Monoid S
inst✝³ : SMul R M
inst✝² : SMul R S
inst✝¹ : MulAction S M
inst✝ : IsScalarTower R S M
h : a • s = 1
⊢ IsSMulRegular M 1
state_after: no goals
tactic: exact one M
Theorem: Filter.Tendsto.const_mul_atTop'
File: Mathlib/Order/Filter/Archimedean.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
⊢ Tendsto (fun x => r * f x) l atTop
state_after: α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
tactic: refine tendsto_atTop.2 fun b => ?_
state_before: α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
state_after: case intro
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ n • r
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
tactic: obtain ⟨n : ℕ, hn : 1 ≤ n • r⟩ := Archimedean.arch 1 hr
state_before: case intro
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ n • r
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
state_after: case intro
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ r * ↑n
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
tactic: rw [nsmul_eq_mul'] at hn
state_before: case intro
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ r * ↑n
⊢ ∀ᶠ (a : α) in l, b ≤ r * f a
state_after: case h
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ r * ↑n
x : α
hx : ↑n * max b 0 ≤ f x
⊢ b ≤ r * f x
tactic: filter_upwards [tendsto_atTop.1 hf (n * max b 0)] with x hx
state_before: case h
α : Type u_1
R : Type u_2
l : Filter α
f : α → R
r : R
inst✝¹ : LinearOrderedSemiring R
inst✝ : Archimedean R
hr : 0 < r
hf : Tendsto f l atTop
b : R
n : ℕ
hn : 1 ≤ r * ↑n
x : α
hx : ↑n * max b 0 ≤ f x
⊢ b ≤ r * f x
state_after: no goals
tactic: calc
    b ≤ 1 * max b 0 := by
    { rw [one_mul]
      exact le_max_left _ _ }
    _ ≤ r * n * max b 0 := by gcongr
    _ = r * (n * max b 0) := by rw [mul_assoc]
    _ ≤ r * f x := by gcongr
Theorem: MvPolynomial.aeval_comp_bind₁
File: Mathlib/Algebra/MvPolynomial/Monad.lean

Proof steps:
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : Algebra R S
f : τ → S
g : σ → MvPolynomial τ R
⊢ (aeval f).comp (bind₁ g) = aeval fun i => (aeval f) (g i)
state_after: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : Algebra R S
f : τ → S
g : σ → MvPolynomial τ R
i✝ : σ
⊢ ((aeval f).comp (bind₁ g)) (X i✝) = (aeval fun i => (aeval f) (g i)) (X i✝)
tactic: ext1
state_before: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : Algebra R S
f : τ → S
g : σ → MvPolynomial τ R
i✝ : σ
⊢ ((aeval f).comp (bind₁ g)) (X i✝) = (aeval fun i => (aeval f) (g i)) (X i✝)
state_after: no goals
tactic: apply aeval_bind₁
Theorem: Rat.eq_iff_mul_eq_mul
File: Mathlib/Data/Rat/Defs.lean

Proof steps:
state_before: q✝ a b c p q : ℚ
⊢ p = q ↔ p.num * ↑q.den = q.num * ↑p.den
state_after: q✝ a b c p q : ℚ
⊢ p.num /. ↑p.den = q.num /. ↑q.den ↔ p.num * ↑q.den = q.num * ↑p.den
tactic: conv =>
    lhs
    rw [← num_divInt_den p, ← num_divInt_den q]
Theorem: logDeriv_eq_zero_of_not_differentiableAt
File: Mathlib/Analysis/Calculus/LogDeriv.lean

Proof steps:
state_before: 𝕜 : Type u_1
𝕜' : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NontriviallyNormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
f : 𝕜 → 𝕜'
x : 𝕜
h : ¬DifferentiableAt 𝕜 f x
⊢ logDeriv f x = 0
state_after: no goals
tactic: simp only [logDeriv_apply, deriv_zero_of_not_differentiableAt h, zero_div]
Theorem: List.range'_concat
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: step s n : Nat
⊢ range' s (n + 1) step = range' s n step ++ [s + step * n]
state_after: step s n : Nat
⊢ range' s (1 + n) step = range' s n step ++ [s + step * n]
tactic: rw [Nat.add_comm n 1]
state_before: step s n : Nat
⊢ range' s (1 + n) step = range' s n step ++ [s + step * n]
state_after: no goals
tactic: exact (range'_append s n 1 step).symm
Theorem: inv_pos_lt_iff_one_lt_mul
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ a⁻¹ < b ↔ 1 < b * a
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ 1 / a < b ↔ 1 < b * a
tactic: rw [inv_eq_one_div]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ 1 / a < b ↔ 1 < b * a
state_after: no goals
tactic: exact div_lt_iff ha
Theorem: MeasureTheory.OuterMeasure.boundedBy_apply
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

Proof steps:
state_before: α : Type u_1
m : Set α → ℝ≥0∞
s : Set α
⊢ (boundedBy m) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨆ (_ : (t n).Nonempty), m (t n)
state_after: no goals
tactic: simp [boundedBy, ofFunction_apply]
Theorem: Nat.mem_primesBelow
File: Mathlib/NumberTheory/SmoothNumbers.lean

Proof steps:
state_before: k n : ℕ
⊢ n ∈ k.primesBelow ↔ n < k ∧ Prime n
state_after: no goals
tactic: simp [primesBelow]
Theorem: AddMonoidAlgebra.mul_of'_modOf
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

Proof steps:
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g : G
⊢ x * of' k G g %ᵒᶠ g = 0
state_after: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
⊢ (x * of' k G g %ᵒᶠ g) g' = 0 g'
tactic: refine Finsupp.ext fun g' => ?_
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
⊢ (x * of' k G g %ᵒᶠ g) g' = 0 g'
state_after: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
⊢ (x * of' k G g %ᵒᶠ g) g' = 0
tactic: rw [Finsupp.zero_apply]
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
⊢ (x * of' k G g %ᵒᶠ g) g' = 0
state_after: case inl.intro
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g d : G
⊢ (x * of' k G g %ᵒᶠ g) (g + d) = 0

case inr
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
h : ¬∃ d, g' = g + d
⊢ (x * of' k G g %ᵒᶠ g) g' = 0
tactic: obtain ⟨d, rfl⟩ | h := em (∃ d, g' = g + d)
Theorem: ExistsContDiffBumpBase.y_smooth
File: Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean

Proof steps:
state_before: E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)
state_after: E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)
tactic: have hs : IsOpen (Ioo (0 : ℝ) (1 : ℝ)) := isOpen_Ioo
state_before: E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)
state_after: E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
hk : IsCompact (closedBall 0 1)
⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)
tactic: have hk : IsCompact (closedBall (0 : E) 1) := ProperSpace.isCompact_closedBall _ _
state_before: E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
hk : IsCompact (closedBall 0 1)
⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)
state_after: case refine_1
E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
hk : IsCompact (closedBall 0 1)
⊢ ∀ (p : ℝ) (x : E), p ∈ Ioo 0 1 → x ∉ closedBall 0 1 → w p x = 0

case refine_2
E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
hk : IsCompact (closedBall 0 1)
⊢ LocallyIntegrable φ μ

case refine_3
E : Type u_1
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : FiniteDimensional ℝ E
inst✝¹ : MeasurableSpace E
inst✝ : BorelSpace E
hs : IsOpen (Ioo 0 1)
hk : IsCompact (closedBall 0 1)
⊢ ContDiffOn ℝ ⊤ (↿w) (Ioo 0 1 ×ˢ univ)
tactic: refine contDiffOn_convolution_left_with_param (lsmul ℝ ℝ) hs hk ?_ ?_ ?_
Theorem: EuclideanGeometry.oangle_midpoint_rev_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
⊢ ∡ p₁ p₂ (midpoint ℝ p₂ p₃) = ∡ p₁ p₂ p₃
state_after: no goals
tactic: rw [midpoint_comm, oangle_midpoint_right]
Theorem: Batteries.RBNode.balance1_eq
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

Proof steps:
state_before: α : Type u_1
c : RBColor
n : Nat
l : RBNode α
v : α
r : RBNode α
hl : l.Balanced c n
⊢ l.balance1 v r = node black l v r
state_after: α : Type u_1
c : RBColor
n : Nat
l : RBNode α
v : α
r : RBNode α
hl : l.Balanced c n
⊢ (match l, v, r with
    | node red (node red a x b) y c, z, d => node red (node black a x b) y (node black c z d)
    | node red a x (node red b y c), z, d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b) =
    node black l v r
tactic: unfold balance1
state_before: α : Type u_1
c : RBColor
n : Nat
l : RBNode α
v : α
r : RBNode α
hl : l.Balanced c n
⊢ (match l, v, r with
    | node red (node red a x b) y c, z, d => node red (node black a x b) y (node black c z d)
    | node red a x (node red b y c), z, d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b) =
    node black l v r
state_after: no goals
tactic: split <;> first | rfl | nomatch hl
Theorem: StieltjesFunction.countable_leftLim_ne
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

Proof steps:
state_before: f✝ f : StieltjesFunction
⊢ {x | leftLim (↑f) x ≠ ↑f x}.Countable
state_after: f✝ f : StieltjesFunction
⊢ {x | leftLim (↑f) x ≠ ↑f x} ⊆ {x | ¬ContinuousAt (↑f) x}
tactic: refine Countable.mono ?_ f.mono.countable_not_continuousAt
state_before: f✝ f : StieltjesFunction
⊢ {x | leftLim (↑f) x ≠ ↑f x} ⊆ {x | ¬ContinuousAt (↑f) x}
state_after: f✝ f : StieltjesFunction
x : ℝ
hx : x ∈ {x | leftLim (↑f) x ≠ ↑f x}
h'x : ContinuousAt (↑f) x
⊢ False
tactic: intro x hx h'x
state_before: f✝ f : StieltjesFunction
x : ℝ
hx : x ∈ {x | leftLim (↑f) x ≠ ↑f x}
h'x : ContinuousAt (↑f) x
⊢ False
state_after: f✝ f : StieltjesFunction
x : ℝ
hx : x ∈ {x | leftLim (↑f) x ≠ ↑f x}
h'x : ContinuousAt (↑f) x
⊢ leftLim (↑f) x = ↑f x
tactic: apply hx
state_before: f✝ f : StieltjesFunction
x : ℝ
hx : x ∈ {x | leftLim (↑f) x ≠ ↑f x}
h'x : ContinuousAt (↑f) x
⊢ leftLim (↑f) x = ↑f x
state_after: no goals
tactic: exact tendsto_nhds_unique (f.mono.tendsto_leftLim x) (h'x.tendsto.mono_left nhdsWithin_le_nhds)
Theorem: PiNat.res_injective
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
α : Type u_2
⊢ Injective res
state_after: E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
⊢ x = y
tactic: intro x y h
state_before: E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
⊢ x = y
state_after: case h
E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
n : ℕ
⊢ x n = y n
tactic: ext n
state_before: case h
E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
n : ℕ
⊢ x n = y n
state_after: E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
n : ℕ
⊢ res x n.succ = res y n.succ
tactic: apply res_eq_res.mp _ (Nat.lt_succ_self _)
state_before: E : ℕ → Type u_1
α : Type u_2
x y : ℕ → α
h : res x = res y
n : ℕ
⊢ res x n.succ = res y n.succ
state_after: no goals
tactic: rw [h]
Theorem: PartialEquiv.transEquiv_transEquiv
File: Mathlib/Logic/Equiv/PartialEquiv.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
f' : β ≃ γ
f'' : γ ≃ δ
⊢ (e.transEquiv f').transEquiv f'' = e.transEquiv (f'.trans f'')
state_after: no goals
tactic: simp only [transEquiv_eq_trans, trans_assoc, Equiv.trans_toPartialEquiv]
Theorem: Nat.chineseRemainderOfList_modEq_unique
File: Mathlib/Data/Nat/ChineseRemainder.lean

Proof steps:
state_before: ι : Type u_1
a s : ι → ℕ
l : List ι
co : List.Pairwise (Coprime on s) l
z : ℕ
hz : ∀ i ∈ l, z ≡ a i [MOD s i]
⊢ z ≡ ↑(chineseRemainderOfList a s l co) [MOD (List.map s l).prod]
state_after: case nil
ι : Type u_1
a s : ι → ℕ
z : ℕ
co : List.Pairwise (Coprime on s) []
hz : ∀ i ∈ [], z ≡ a i [MOD s i]
⊢ z ≡ ↑(chineseRemainderOfList a s [] co) [MOD (List.map s []).prod]

case cons
ι : Type u_1
a s : ι → ℕ
z : ℕ
i : ι
l : List ι
ih :
  ∀ (co : List.Pairwise (Coprime on s) l),
    (∀ i ∈ l, z ≡ a i [MOD s i]) → z ≡ ↑(chineseRemainderOfList a s l co) [MOD (List.map s l).prod]
co : List.Pairwise (Coprime on s) (i :: l)
hz : ∀ i_1 ∈ i :: l, z ≡ a i_1 [MOD s i_1]
⊢ z ≡ ↑(chineseRemainderOfList a s (i :: l) co) [MOD (List.map s (i :: l)).prod]
tactic: induction' l with i l ih
Theorem: AlgebraicGeometry.Scheme.Spec_map
File: Mathlib/AlgebraicGeometry/Scheme.lean

Proof steps:
state_before: R : CommRingCatᵒᵖ
⊢ { obj := fun R => Spec (unop R), map := fun {X Y} f => Spec.map f.unop }.map (𝟙 R) =
    𝟙 ({ obj := fun R => Spec (unop R), map := fun {X Y} f => Spec.map f.unop }.obj R)
state_after: no goals
tactic: simp
state_before: X✝ Y✝ Z✝ : CommRingCatᵒᵖ
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun R => Spec (unop R), map := fun {X Y} f => Spec.map f.unop }.map (f ≫ g) =
    { obj := fun R => Spec (unop R), map := fun {X Y} f => Spec.map f.unop }.map f ≫
      { obj := fun R => Spec (unop R), map := fun {X Y} f => Spec.map f.unop }.map g
state_after: no goals
tactic: simp
Theorem: Cardinal.toNat_add
File: Mathlib/SetTheory/Cardinal/ToNat.lean

Proof steps:
state_before: α : Type u
c d : Cardinal.{u}
hc : c < ℵ₀
hd : d < ℵ₀
⊢ toNat (c + d) = toNat c + toNat d
state_after: case intro
α : Type u
d : Cardinal.{u}
hd : d < ℵ₀
c : ℕ
⊢ toNat (↑c + d) = toNat ↑c + toNat d
tactic: lift c to ℕ using hc
state_before: case intro
α : Type u
d : Cardinal.{u}
hd : d < ℵ₀
c : ℕ
⊢ toNat (↑c + d) = toNat ↑c + toNat d
state_after: case intro.intro
α : Type u
c d : ℕ
⊢ toNat (↑c + ↑d) = toNat ↑c + toNat ↑d
tactic: lift d to ℕ using hd
state_before: case intro.intro
α : Type u
c d : ℕ
⊢ toNat (↑c + ↑d) = toNat ↑c + toNat ↑d
state_after: no goals
tactic: norm_cast
Theorem: not_neZero
File: Mathlib/Algebra/NeZero.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Zero R
n : R
⊢ ¬NeZero n ↔ n = 0
state_after: no goals
tactic: simp [neZero_iff]
Theorem: AddCommute.sub_eq_sub_iff_of_isAddUnit
File: Mathlib/Algebra/Group/Commute/Units.lean

Proof steps:
state_before: M : Type u_1
inst✝ : DivisionMonoid M
a b c d : M
hbd : Commute b d
hb : IsUnit b
hd : IsUnit d
⊢ a / b = c / d ↔ a * d = c * b
state_after: no goals
tactic: rw [← (hb.mul hd).mul_left_inj, ← mul_assoc, hb.div_mul_cancel, ← mul_assoc, hbd.right_comm,
    hd.div_mul_cancel]
Theorem: Matrix.det_neg
File: Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
A : Matrix n n R
⊢ (-A).det = (-1) ^ Fintype.card n * A.det
state_after: no goals
tactic: rw [← det_smul, neg_one_smul]
Theorem: Filter.prod_inj
File: Mathlib/Order/Filter/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
⊢ f₁ ×ˢ g₁ = f₂ ×ˢ g₂ ↔ f₁ = f₂ ∧ g₁ = g₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
⊢ f₁ = f₂ ∧ g₁ = g₂
tactic: refine ⟨fun h => ?_, fun h => h.1 ▸ h.2 ▸ rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
⊢ f₁ = f₂ ∧ g₁ = g₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
⊢ f₁ = f₂ ∧ g₁ = g₂
tactic: have hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂ := prod_le_prod.1 h.le
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
⊢ f₁ = f₂ ∧ g₁ = g₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
this : f₂.NeBot
⊢ f₁ = f₂ ∧ g₁ = g₂
tactic: haveI := neBot_of_le hle.1
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
this : f₂.NeBot
⊢ f₁ = f₂ ∧ g₁ = g₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
this✝ : f₂.NeBot
this : g₂.NeBot
⊢ f₁ = f₂ ∧ g₁ = g₂
tactic: haveI := neBot_of_le hle.2
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
f₁ f₂ : Filter α
g₁ g₂ : Filter β
inst✝¹ : f₁.NeBot
inst✝ : g₁.NeBot
h : f₁ ×ˢ g₁ = f₂ ×ˢ g₂
hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂
this✝ : f₂.NeBot
this : g₂.NeBot
⊢ f₁ = f₂ ∧ g₁ = g₂
state_after: no goals
tactic: exact ⟨hle.1.antisymm <| (prod_le_prod.1 h.ge).1, hle.2.antisymm <| (prod_le_prod.1 h.ge).2⟩
Theorem: ENNReal.exists_nat_pos_inv_mul_lt
File: Mathlib/Data/ENNReal/Inv.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
⊢ ∃ n > 0, (↑n)⁻¹ * a < b
state_after: case intro.intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ ∃ n > 0, (↑n)⁻¹ * a < b
tactic: rcases exists_nat_pos_mul_gt hb ha with ⟨n, npos, hn⟩
state_before: case intro.intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ ∃ n > 0, (↑n)⁻¹ * a < b
state_after: case right
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ (↑n)⁻¹ * a < b
tactic: use n, npos
state_before: case right
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ (↑n)⁻¹ * a < b
state_after: case right
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ a / ↑n < b
tactic: rw [← ENNReal.div_eq_inv_mul]
state_before: case right
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
n : ℕ
npos : n > 0
hn : a < ↑n * b
⊢ a / ↑n < b
state_after: no goals
tactic: exact div_lt_of_lt_mul' hn
Theorem: Computable.option_casesOn
File: Mathlib/Computability/Partrec.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 β
f : α → σ
g : α → β → σ
ho : Computable o
hf : Computable f
hg : Computable₂ g
a : α
⊢ (Nat.casesOn (encode (o a)) (Option.some (f a)) fun n => Option.map (g a) (decode n)) =
    Option.some (Option.casesOn (o a) (f a) (g a))
state_after: no goals
tactic: cases o a <;> simp [encodek]