ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: PiNat.isOpen_iff_dist
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
⊢ IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s
state_after: case mp
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
⊢ IsOpen s → ∀ x ∈ s, ∃ ε > 0, ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s

case mpr
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
⊢ (∀ x ∈ s, ∃ ε > 0, ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s) → IsOpen s
tactic: constructor
Theorem: PartialEquiv.image_eq_target_inter_inv_preimage
File: Mathlib/Logic/Equiv/PartialEquiv.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
s : Set α
h : s ⊆ e.source
⊢ ↑e '' s = e.target ∩ ↑e.symm ⁻¹' s
state_after: no goals
tactic: rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
Theorem: HasSum.add_isCompl
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : TopologicalSpace α
f g : β → α
a b : α
s✝ : Finset β
inst✝ : ContinuousMul α
s t : Set β
hs : IsCompl s t
ha : HasProd (f ∘ Subtype.val) a
hb : HasProd (f ∘ Subtype.val) b
⊢ HasProd f (a * b)
state_after: no goals
tactic: simpa [← hs.compl_eq] using
    (hasProd_subtype_iff_mulIndicator.1 ha).mul (hasProd_subtype_iff_mulIndicator.1 hb)
Theorem: orderOf_eq_orderOf_iff
File: Mathlib/GroupTheory/OrderOfElement.lean

Proof steps:
state_before: G : Type u_1
H✝ : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Monoid G
a b x y✝ : G
n m : ℕ
H : Type u_6
inst✝ : Monoid H
y : H
⊢ orderOf x = orderOf y ↔ ∀ (n : ℕ), x ^ n = 1 ↔ y ^ n = 1
state_after: no goals
tactic: simp_rw [← isPeriodicPt_mul_iff_pow_eq_one, ← minimalPeriod_eq_minimalPeriod_iff, orderOf]
Theorem: Real.arctan_inv_2_add_arctan_inv_3
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

Proof steps:
state_before: ⊢ arctan 2⁻¹ + arctan 3⁻¹ = π / 4
state_after: no goals
tactic: rw [arctan_add] <;> norm_num
Theorem: Filter.countable_compl_ker
File: Mathlib/Order/Filter/Cofinite.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : l.IsCountablyGenerated
h : cofinite ≤ l
⊢ l.kerᶜ.Countable
state_after: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : l.IsCountablyGenerated
h : cofinite ≤ l
s : ℕ → Set α
hs : l.HasAntitoneBasis s
⊢ l.kerᶜ.Countable
tactic: rcases exists_antitone_basis l with ⟨s, hs⟩
state_before: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : l.IsCountablyGenerated
h : cofinite ≤ l
s : ℕ → Set α
hs : l.HasAntitoneBasis s
⊢ l.kerᶜ.Countable
state_after: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : l.IsCountablyGenerated
h : cofinite ≤ l
s : ℕ → Set α
hs : l.HasAntitoneBasis s
⊢ (⋃ i, (s i)ᶜ).Countable
tactic: simp only [hs.ker, iInter_true, compl_iInter]
state_before: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : l.IsCountablyGenerated
h : cofinite ≤ l
s : ℕ → Set α
hs : l.HasAntitoneBasis s
⊢ (⋃ i, (s i)ᶜ).Countable
state_after: no goals
tactic: exact countable_iUnion fun n ↦ Set.Finite.countable <| h <| hs.mem _
Theorem: Subgroup.coe_topologicalClosure_bot
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x : α
⊢ ↑⊥.topologicalClosure = _root_.closure {1}
state_after: no goals
tactic: simp
Theorem: FirstOrder.Language.BoundedFormula.realize_rel₁
File: Mathlib/ModelTheory/Semantics.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n l : ℕ
φ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v : α → M
xs : Fin l → M
R : L.Relations 1
t : L.Term (α ⊕ Fin l)
⊢ (R.boundedFormula₁ t).Realize v xs ↔ RelMap R ![realize (Sum.elim v xs) t]
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n l : ℕ
φ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v : α → M
xs : Fin l → M
R : L.Relations 1
t : L.Term (α ⊕ Fin l)
⊢ (RelMap R fun i => realize (Sum.elim v xs) (![t] i)) = RelMap R ![realize (Sum.elim v xs) t]
tactic: rw [Relations.boundedFormula₁, realize_rel, iff_eq_eq]
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n l : ℕ
φ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v : α → M
xs : Fin l → M
R : L.Relations 1
t : L.Term (α ⊕ Fin l)
⊢ (RelMap R fun i => realize (Sum.elim v xs) (![t] i)) = RelMap R ![realize (Sum.elim v xs) t]
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n l : ℕ
φ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v : α → M
xs : Fin l → M
R : L.Relations 1
t : L.Term (α ⊕ Fin l)
x✝ : Fin 1
⊢ realize (Sum.elim v xs) (![t] x✝) = ![realize (Sum.elim v xs) t] x✝
tactic: refine congr rfl (funext fun _ => ?_)
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n l : ℕ
φ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v : α → M
xs : Fin l → M
R : L.Relations 1
t : L.Term (α ⊕ Fin l)
x✝ : Fin 1
⊢ realize (Sum.elim v xs) (![t] x✝) = ![realize (Sum.elim v xs) t] x✝
state_after: no goals
tactic: simp only [Matrix.cons_val_fin_one]
Theorem: AffineIsometry.nndist_map
File: Mathlib/Analysis/NormedSpace/AffineIsometry.lean

Proof steps:
state_before: 𝕜 : Type u_1
V : Type u_2
V₁ : Type u_3
V₁' : Type u_4
V₂ : Type u_5
V₃ : Type u_6
V₄ : Type u_7
P₁ : Type u_8
P₁' : Type u_9
P : Type u_10
P₂ : Type u_11
P₃ : Type u_12
P₄ : Type u_13
inst✝²⁴ : NormedField 𝕜
inst✝²³ : SeminormedAddCommGroup V
inst✝²² : NormedSpace 𝕜 V
inst✝²¹ : PseudoMetricSpace P
inst✝²⁰ : NormedAddTorsor V P
inst✝¹⁹ : SeminormedAddCommGroup V₁
inst✝¹⁸ : NormedSpace 𝕜 V₁
inst✝¹⁷ : PseudoMetricSpace P₁
inst✝¹⁶ : NormedAddTorsor V₁ P₁
inst✝¹⁵ : SeminormedAddCommGroup V₁'
inst✝¹⁴ : NormedSpace 𝕜 V₁'
inst✝¹³ : MetricSpace P₁'
inst✝¹² : NormedAddTorsor V₁' P₁'
inst✝¹¹ : SeminormedAddCommGroup V₂
inst✝¹⁰ : NormedSpace 𝕜 V₂
inst✝⁹ : PseudoMetricSpace P₂
inst✝⁸ : NormedAddTorsor V₂ P₂
inst✝⁷ : SeminormedAddCommGroup V₃
inst✝⁶ : NormedSpace 𝕜 V₃
inst✝⁵ : PseudoMetricSpace P₃
inst✝⁴ : NormedAddTorsor V₃ P₃
inst✝³ : SeminormedAddCommGroup V₄
inst✝² : NormedSpace 𝕜 V₄
inst✝¹ : PseudoMetricSpace P₄
inst✝ : NormedAddTorsor V₄ P₄
f : P →ᵃⁱ[𝕜] P₂
f₁ : P₁' →ᵃⁱ[𝕜] P₂
x y : P
⊢ nndist (f x) (f y) = nndist x y
state_after: no goals
tactic: simp [nndist_dist]
Theorem: schnirelmannDensity_lt_iff
File: Mathlib/Combinatorics/Schnirelmann.lean

Proof steps:
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ schnirelmannDensity A < x ↔ ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x
state_after: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ (¬∀ (n : ℕ), 0 < n → x ≤ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n) ↔
    ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x
tactic: rw [← not_le, le_schnirelmannDensity_iff]
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ (¬∀ (n : ℕ), 0 < n → x ≤ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n) ↔
    ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x
state_after: no goals
tactic: simp
Theorem: CauSeq.pow_equiv_pow
File: Mathlib/Algebra/Order/CauSeq/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f1 f2 : CauSeq β abv
hf : f1 ≈ f2
n : ℕ
⊢ f1 ^ n ≈ f2 ^ n
state_after: case zero
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f1 f2 : CauSeq β abv
hf : f1 ≈ f2
⊢ f1 ^ 0 ≈ f2 ^ 0

case succ
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f1 f2 : CauSeq β abv
hf : f1 ≈ f2
n : ℕ
ih : f1 ^ n ≈ f2 ^ n
⊢ f1 ^ (n + 1) ≈ f2 ^ (n + 1)
tactic: induction' n with n ih
Theorem: GaloisInsertion.l_biInf_u
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₂ : β
l : α → β
u : β → α
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
gi : GaloisInsertion l u
ι : Sort x
p : ι → Prop
f : (i : ι) → p i → β
⊢ l (⨅ i, ⨅ (hi : p i), u (f i hi)) = ⨅ i, ⨅ (hi : p i), f i hi
state_after: no goals
tactic: simp only [iInf_subtype', gi.l_iInf_u]
Theorem: IsLocalMinOn.fderivWithin_nonneg
File: Mathlib/Analysis/Calculus/LocalExtr/Basic.lean

Proof steps:
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ 0 ≤ (fderivWithin ℝ f s a) y
state_after: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ 0 ≤ 0 y
tactic: rw [fderivWithin_zero_of_not_differentiableWithinAt hf]
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ 0 ≤ 0 y
state_after: no goals
tactic: rfl
Theorem: Nat.totient_prime_pow_succ
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: p : ℕ
hp : Prime p
n : ℕ
⊢ filter (p ^ (n + 1)).Coprime (range (p ^ (n + 1))) = range (p ^ (n + 1)) \ image (fun x => x * p) (range (p ^ n))
state_after: p : ℕ
hp : Prime p
n : ℕ
⊢ filter (p ^ (n + 1)).Coprime (range (p ^ (n + 1))) =
    filter (fun x => x ∉ image (fun x => x * p) (range (p ^ n))) (range (p ^ (n + 1)))
tactic: rw [sdiff_eq_filter]
state_before: p : ℕ
hp : Prime p
n : ℕ
⊢ filter (p ^ (n + 1)).Coprime (range (p ^ (n + 1))) =
    filter (fun x => x ∉ image (fun x => x * p) (range (p ^ n))) (range (p ^ (n + 1)))
state_after: case H
p : ℕ
hp : Prime p
n : ℕ
⊢ ∀ x ∈ range (p ^ (n + 1)), (p ^ (n + 1)).Coprime x ↔ x ∉ image (fun x => x * p) (range (p ^ n))
tactic: apply filter_congr
state_before: case H
p : ℕ
hp : Prime p
n : ℕ
⊢ ∀ x ∈ range (p ^ (n + 1)), (p ^ (n + 1)).Coprime x ↔ x ∉ image (fun x => x * p) (range (p ^ n))
state_after: case H
p : ℕ
hp : Prime p
n : ℕ
⊢ ∀ x < p ^ (n + 1), ¬p ∣ x ↔ ∀ (x_1 : ℕ), ¬(x_1 < p ^ n ∧ x_1 * p = x)
tactic: simp only [mem_range, mem_filter, coprime_pow_left_iff n.succ_pos, mem_image, not_exists,
            hp.coprime_iff_not_dvd]
state_before: case H
p : ℕ
hp : Prime p
n : ℕ
⊢ ∀ x < p ^ (n + 1), ¬p ∣ x ↔ ∀ (x_1 : ℕ), ¬(x_1 < p ^ n ∧ x_1 * p = x)
state_after: case H
p : ℕ
hp : Prime p
n a : ℕ
ha : a < p ^ (n + 1)
⊢ ¬p ∣ a ↔ ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)
tactic: intro a ha
state_before: case H
p : ℕ
hp : Prime p
n a : ℕ
ha : a < p ^ (n + 1)
⊢ ¬p ∣ a ↔ ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)
state_after: case H.mp
p : ℕ
hp : Prime p
n a : ℕ
ha : a < p ^ (n + 1)
⊢ ¬p ∣ a → ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)

case H.mpr
p : ℕ
hp : Prime p
n a : ℕ
ha : a < p ^ (n + 1)
⊢ (∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)) → ¬p ∣ a
tactic: constructor
state_before: p : ℕ
hp : Prime p
n : ℕ
h1 : Function.Injective fun x => x * p
h2 : image (fun x => x * p) (range (p ^ n)) ⊆ range (p ^ (n + 1))
⊢ (range (p ^ (n + 1)) \ image (fun x => x * p) (range (p ^ n))).card = p ^ n * (p - 1)
state_after: no goals
tactic: rw [card_sdiff h2, Finset.card_image_of_injective _ h1, card_range, card_range, ←
        one_mul (p ^ n), pow_succ', ← tsub_mul, one_mul, mul_comm]
Theorem: FirstOrder.Language.relMap_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 : ℕ
r : L.Relations n
x : Fin n → M
⊢ (RelMap r fun i => ⟦x i⟧) ↔ RelMap r x
state_after: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
r : L.Relations n
x : Fin n → M
⊢ Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x
tactic: change
    Quotient.lift (@RelMap L M ps.toStructure n r) Prestructure.rel_equiv (Quotient.finChoice _) ↔
      _
state_before: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
r : L.Relations n
x : Fin n → M
⊢ Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x
state_after: no goals
tactic: rw [Quotient.finChoice_eq, Quotient.lift_mk]
Theorem: FreeGroup.Red.Step.lift
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

Proof steps:
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
inst✝ : Group β
f✝ : α → β
x y : FreeGroup α
f : α → β
H : Step L₁ L₂
⊢ Lift.aux f L₁ = Lift.aux f L₂
state_after: case not
α : Type u
L L₃ L₄ : List (α × Bool)
β : Type v
inst✝ : Group β
f✝ : α → β
x y : FreeGroup α
f : α → β
L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b : Bool
⊢ Lift.aux f (L₁✝ ++ (x✝, b) :: (x✝, !b) :: L₂✝) = Lift.aux f (L₁✝ ++ L₂✝)
tactic: cases' H with _ _ _ b
state_before: case not
α : Type u
L L₃ L₄ : List (α × Bool)
β : Type v
inst✝ : Group β
f✝ : α → β
x y : FreeGroup α
f : α → β
L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b : Bool
⊢ Lift.aux f (L₁✝ ++ (x✝, b) :: (x✝, !b) :: L₂✝) = Lift.aux f (L₁✝ ++ L₂✝)
state_after: no goals
tactic: cases b <;> simp [Lift.aux]
Theorem: Units.liftRight_inv_mul
File: Mathlib/Algebra/Group/Units/Hom.lean

Proof steps:
state_before: α : Type u_1
M : Type u
N : Type v
P : Type w
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
f : M →* N
g : M → Nˣ
h : ∀ (x : M), ↑(g x) = f x
x : M
⊢ ↑((liftRight f g h) x)⁻¹ * f x = 1
state_after: no goals
tactic: rw [Units.inv_mul_eq_iff_eq_mul, mul_one, coe_liftRight]
Theorem: Metric.denseRange_iff
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x✝ y z : α
ε ε₁ ε₂ : ℝ
s : Set α
f : β → α
x : α
⊢ x ∈ closure (range f) ↔ ∀ r > 0, ∃ y, dist x (f y) < r
state_after: no goals
tactic: simp only [mem_closure_iff, exists_range_iff]
Theorem: CategoryTheory.Presheaf.isLocallySurjective_of_isLocallySurjective_fac
File: Mathlib/CategoryTheory/Sites/LocallySurjective.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
f₃ : F₁ ⟶ F₃
fac : f₁ ≫ f₂ = f₃
inst✝ : IsLocallySurjective J f₃
⊢ IsLocallySurjective J f₂
state_after: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
inst✝ : IsLocallySurjective J (f₁ ≫ f₂)
⊢ IsLocallySurjective J f₂
tactic: subst fac
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝² : Category.{v', u'} A
inst✝¹ : ConcreteCategory A
F₁ F₂ F₃ : Cᵒᵖ ⥤ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
inst✝ : IsLocallySurjective J (f₁ ≫ f₂)
⊢ IsLocallySurjective J f₂
state_after: no goals
tactic: exact isLocallySurjective_of_isLocallySurjective J f₁ f₂
Theorem: List.comp_traverse
File: Mathlib/Control/Traversable/Instances.lean

Proof steps:
state_before: F G : Type u → Type u
inst✝² : Applicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α : Type u_1
β γ : Type u
f : β → F γ
g : α → G β
x : List α
⊢ List.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Comp.mk (List.traverse f <$> List.traverse g x)
state_after: no goals
tactic: induction x <;> simp! [*, functor_norm] <;> rfl
Theorem: Finsupp.embDomain_comapDomain
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ↪ β
g : β →₀ M
hg : ↑g.support ⊆ Set.range ⇑f
⊢ embDomain f (comapDomain (⇑f) g ⋯) = g
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ↪ β
g : β →₀ M
hg : ↑g.support ⊆ Set.range ⇑f
b : β
⊢ (embDomain f (comapDomain (⇑f) g ⋯)) b = g b
tactic: ext b
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ↪ β
g : β →₀ M
hg : ↑g.support ⊆ Set.range ⇑f
b : β
⊢ (embDomain f (comapDomain (⇑f) g ⋯)) b = g b
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ↪ β
g : β →₀ M
hg : ↑g.support ⊆ Set.range ⇑f
b : β
hb : b ∈ Set.range ⇑f
⊢ (embDomain f (comapDomain (⇑f) g ⋯)) b = g b

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ↪ β
g : β →₀ M
hg : ↑g.support ⊆ Set.range ⇑f
b : β
hb : b ∉ Set.range ⇑f
⊢ (embDomain f (comapDomain (⇑f) g ⋯)) b = g b
tactic: by_cases hb : b ∈ Set.range f
Theorem: QuadraticMap.two_nsmul_associated
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : CommSemiring S
inst✝³ : Algebra S R
inst✝² : Module S N
inst✝¹ : IsScalarTower S R N
inst✝ : Invertible 2
B₁ : BilinMap R M R
Q : QuadraticMap R M N
⊢ 2 • (associatedHom S) Q = Q.polarBilin
state_after: case h.h
S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : CommSemiring S
inst✝³ : Algebra S R
inst✝² : Module S N
inst✝¹ : IsScalarTower S R N
inst✝ : Invertible 2
B₁ : BilinMap R M R
Q : QuadraticMap R M N
x✝¹ x✝ : M
⊢ ((2 • (associatedHom S) Q) x✝¹) x✝ = (Q.polarBilin x✝¹) x✝
tactic: ext
state_before: case h.h
S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : CommSemiring S
inst✝³ : Algebra S R
inst✝² : Module S N
inst✝¹ : IsScalarTower S R N
inst✝ : Invertible 2
B₁ : BilinMap R M R
Q : QuadraticMap R M N
x✝¹ x✝ : M
⊢ ((2 • (associatedHom S) Q) x✝¹) x✝ = (Q.polarBilin x✝¹) x✝
state_after: case h.h
S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : CommSemiring S
inst✝³ : Algebra S R
inst✝² : Module S N
inst✝¹ : IsScalarTower S R N
inst✝ : Invertible 2
B₁ : BilinMap R M R
Q : QuadraticMap R M N
x✝¹ x✝ : M
⊢ 2 • ⅟2 • (Q (x✝¹ + x✝) - Q x✝¹ - Q x✝) = polar (⇑Q) x✝¹ x✝
tactic: dsimp
state_before: case h.h
S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : CommSemiring S
inst✝³ : Algebra S R
inst✝² : Module S N
inst✝¹ : IsScalarTower S R N
inst✝ : Invertible 2
B₁ : BilinMap R M R
Q : QuadraticMap R M N
x✝¹ x✝ : M
⊢ 2 • ⅟2 • (Q (x✝¹ + x✝) - Q x✝¹ - Q x✝) = polar (⇑Q) x✝¹ x✝
state_after: no goals
tactic: rw [← smul_assoc, two_nsmul, invOf_two_add_invOf_two, one_smul, polar]
Theorem: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst
File: Mathlib/AlgebraicGeometry/Gluing.lean

Proof steps:
state_before: X : Scheme
𝒰 : X.OpenCover
x y z : 𝒰.J
⊢ 𝒰.gluedCoverT' x y z ≫
      pullback.fst (pullback.fst (𝒰.map y) (𝒰.map z)) (pullback.fst (𝒰.map y) (𝒰.map x)) ≫
        pullback.fst (𝒰.map y) (𝒰.map z) =
    pullback.fst (pullback.fst (𝒰.map x) (𝒰.map y)) (pullback.fst (𝒰.map x) (𝒰.map z)) ≫
      pullback.snd (𝒰.map x) (𝒰.map y)
state_after: X : Scheme
𝒰 : X.OpenCover
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (𝒰.map x) (𝒰.map z) (pullback.fst (𝒰.map x) (𝒰.map y))).hom ≫
        (pullback.map (pullback.fst (𝒰.map x) (𝒰.map y) ≫ 𝒰.map x) (𝒰.map z)
              (pullback.fst (𝒰.map y) (𝒰.map x) ≫ 𝒰.map y) (𝒰.map z) (pullbackSymmetry (𝒰.map x) (𝒰.map y)).hom
              (𝟙 (𝒰.obj z)) (𝟙 X) ⋯ ⋯ ≫
            (pullbackRightPullbackFstIso (𝒰.map y) (𝒰.map z) (pullback.fst (𝒰.map y) (𝒰.map x))).inv) ≫
          (pullbackSymmetry (pullback.fst (𝒰.map y) (𝒰.map x)) (pullback.fst (𝒰.map y) (𝒰.map z))).hom) ≫
      pullback.fst (pullback.fst (𝒰.map y) (𝒰.map z)) (pullback.fst (𝒰.map y) (𝒰.map x)) ≫
        pullback.fst (𝒰.map y) (𝒰.map z) =
    pullback.fst (pullback.fst (𝒰.map x) (𝒰.map y)) (pullback.fst (𝒰.map x) (𝒰.map z)) ≫
      pullback.snd (𝒰.map x) (𝒰.map y)
tactic: delta gluedCoverT'
state_before: X : Scheme
𝒰 : X.OpenCover
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (𝒰.map x) (𝒰.map z) (pullback.fst (𝒰.map x) (𝒰.map y))).hom ≫
        (pullback.map (pullback.fst (𝒰.map x) (𝒰.map y) ≫ 𝒰.map x) (𝒰.map z)
              (pullback.fst (𝒰.map y) (𝒰.map x) ≫ 𝒰.map y) (𝒰.map z) (pullbackSymmetry (𝒰.map x) (𝒰.map y)).hom
              (𝟙 (𝒰.obj z)) (𝟙 X) ⋯ ⋯ ≫
            (pullbackRightPullbackFstIso (𝒰.map y) (𝒰.map z) (pullback.fst (𝒰.map y) (𝒰.map x))).inv) ≫
          (pullbackSymmetry (pullback.fst (𝒰.map y) (𝒰.map x)) (pullback.fst (𝒰.map y) (𝒰.map z))).hom) ≫
      pullback.fst (pullback.fst (𝒰.map y) (𝒰.map z)) (pullback.fst (𝒰.map y) (𝒰.map x)) ≫
        pullback.fst (𝒰.map y) (𝒰.map z) =
    pullback.fst (pullback.fst (𝒰.map x) (𝒰.map y)) (pullback.fst (𝒰.map x) (𝒰.map z)) ≫
      pullback.snd (𝒰.map x) (𝒰.map y)
state_after: no goals
tactic: simp
Theorem: add_tsub_add_le_tsub_left
File: Mathlib/Algebra/Order/Sub/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b - (a + c) ≤ b - c
state_after: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b ≤ a + (c + (b - c))
tactic: rw [tsub_le_iff_left, add_assoc]
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b ≤ a + (c + (b - c))
state_after: no goals
tactic: exact add_le_add_left le_add_tsub _
Theorem: CovBy.exists_finset_insert
File: Mathlib/Data/Finset/Grade.lean

Proof steps:
state_before: α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
h : s ⋖ t
⊢ ∃ a ∉ s, insert a s = t
state_after: no goals
tactic: simpa using h.exists_finset_cons
Theorem: IsUnit.div_left_inj
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
a b c : α
h : IsUnit c
⊢ a / c = b / c ↔ a = b
state_after: α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
a b c : α
h : IsUnit c
⊢ a * c⁻¹ = b * c⁻¹ ↔ a = b
tactic: simp only [div_eq_mul_inv]
state_before: α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
a b c : α
h : IsUnit c
⊢ a * c⁻¹ = b * c⁻¹ ↔ a = b
state_after: no goals
tactic: exact Units.mul_left_inj h.inv.unit'