1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.Limits.Types.FilteredColimit.rel_eq_eqvGen_quot_rel
File: Mathlib/CategoryTheory/Limits/TypesFiltered.lean

tactic: ext ⟨j, x⟩ ⟨j', y⟩
state_before: J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
⊢ FilteredColimit.Rel F = EqvGen (Quot.Rel F)
state_after: case h.mk.h.mk.a
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩ ↔ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩

tactic: constructor
state_before: case h.mk.h.mk.a
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩ ↔ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩
state_after: case h.mk.h.mk.a.mp
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩ → EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩

case h.mk.h.mk.a.mpr
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩ → FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩

tactic: apply eqvGen_quot_rel_of_rel
state_before: case h.mk.h.mk.a.mp
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩ → EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩
state_after: no goals

tactic: rw [← (FilteredColimit.rel_equiv F).eqvGen_iff]
state_before: case h.mk.h.mk.a.mpr
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩ → FilteredColimit.Rel F ⟨j, x⟩ ⟨j', y⟩
state_after: case h.mk.h.mk.a.mpr
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩ → EqvGen (FilteredColimit.Rel F) ⟨j, x⟩ ⟨j', y⟩

tactic: exact EqvGen.mono (rel_of_quot_rel F)
state_before: case h.mk.h.mk.a.mpr
J : Type v
inst✝² : Category.{w, v} J
F : J ⥤ Type u
inst✝¹ : HasColimit F
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) ⟨j, x⟩ ⟨j', y⟩ → EqvGen (FilteredColimit.Rel F) ⟨j, x⟩ ⟨j', y⟩
state_after: no goals
Theorem: Finset.Iic_erase
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: ext
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b : α
⊢ (Iic b).erase b = Iio b
state_after: case a
ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b a✝ : α
⊢ a✝ ∈ (Iic b).erase b ↔ a✝ ∈ Iio b

tactic: simp_rw [Finset.mem_erase, mem_Iic, mem_Iio, lt_iff_le_and_ne, and_comm]
state_before: case a
ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b a✝ : α
⊢ a✝ ∈ (Iic b).erase b ↔ a✝ ∈ Iio b
state_after: no goals
Theorem: Orientation.norm_div_cos_oangle_add_right_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: have hs : (o.oangle x (x + y)).sign = 1 := by
  rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ ‖x‖ / (o.oangle x (x + y)).cos = ‖x + y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ ‖x‖ / (o.oangle x (x + y)).cos = ‖x + y‖

tactic: rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,
  InnerProductGeometry.norm_div_cos_angle_add_of_inner_eq_zero
    (o.inner_eq_zero_of_oangle_eq_pi_div_two h)
    (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ ‖x‖ / (o.oangle x (x + y)).cos = ‖x + y‖
state_after: no goals

tactic: rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle x (x + y)).sign = 1
state_after: no goals
Theorem: YoungDiagram.rowLen_ofRowLens
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: simp [rowLen, Nat.find_eq_iff, mem_ofRowLens]
state_before: w : List ℕ
hw : List.Sorted (fun x x_1 => x ≥ x_1) w
i : Fin w.length
⊢ (ofRowLens w hw).rowLen ↑i = w.get i
state_after: no goals
Theorem: Set.star_mem_centralizer'
File: Mathlib/Algebra/Star/Center.lean

tactic: simpa using congr_arg star (ha _ (h _ hy)).symm
state_before: R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
h : ∀ a ∈ s, star a ∈ s
ha : a ∈ s.centralizer
y : R
hy : y ∈ s
⊢ y * star a = star a * y
state_after: no goals
Theorem: infClosure_empty
File: Mathlib/Order/SupClosed.lean

tactic: simp
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : SemilatticeInf α
inst✝ : SemilatticeInf β
s t : Set α
a b : α
⊢ infClosure ∅ = ∅
state_after: no goals
Theorem: exists_int_lt
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: rw [Int.cast_neg]
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
n : ℤ
h : -x < ↑n
⊢ ↑(-n) < x
state_after: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
n : ℤ
h : -x < ↑n
⊢ -↑n < x

tactic: exact neg_lt.1 h
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
n : ℤ
h : -x < ↑n
⊢ -↑n < x
state_after: no goals
Theorem: Set.strictAntiOn_iff_strictAnti
File: Mathlib/Data/Set/Basic.lean

tactic: simp [StrictAnti, StrictAntiOn]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ StrictAntiOn f s ↔ StrictAnti fun a => f ↑a
state_after: no goals
Theorem: HolderOnWith.comp
File: Mathlib/Topology/MetricSpace/Holder.lean

tactic: intro x hx y hy
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f✝ : X → Y
s t✝ : Set X
Cg rg : ℝ≥0
g : Y → Z
t : Set Y
hg : HolderOnWith Cg rg g t
Cf rf : ℝ≥0
f : X → Y
hf : HolderOnWith Cf rf f s
hst : MapsTo f s t
⊢ HolderOnWith (Cg * Cf ^ ↑rg) (rg * rf) (g ∘ f) s
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f✝ : X → Y
s t✝ : Set X
Cg rg : ℝ≥0
g : Y → Z
t : Set Y
hg : HolderOnWith Cg rg g t
Cf rf : ℝ≥0
f : X → Y
hf : HolderOnWith Cf rf f s
hst : MapsTo f s t
x : X
hx : x ∈ s
y : X
hy : y ∈ s
⊢ edist ((g ∘ f) x) ((g ∘ f) y) ≤ ↑(Cg * Cf ^ ↑rg) * edist x y ^ ↑(rg * rf)

tactic: rw [ENNReal.coe_mul, mul_comm rg, NNReal.coe_mul, ENNReal.rpow_mul, mul_assoc,
  ← ENNReal.coe_rpow_of_nonneg _ rg.coe_nonneg, ← ENNReal.mul_rpow_of_nonneg _ _ rg.coe_nonneg]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f✝ : X → Y
s t✝ : Set X
Cg rg : ℝ≥0
g : Y → Z
t : Set Y
hg : HolderOnWith Cg rg g t
Cf rf : ℝ≥0
f : X → Y
hf : HolderOnWith Cf rf f s
hst : MapsTo f s t
x : X
hx : x ∈ s
y : X
hy : y ∈ s
⊢ edist ((g ∘ f) x) ((g ∘ f) y) ≤ ↑(Cg * Cf ^ ↑rg) * edist x y ^ ↑(rg * rf)
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f✝ : X → Y
s t✝ : Set X
Cg rg : ℝ≥0
g : Y → Z
t : Set Y
hg : HolderOnWith Cg rg g t
Cf rf : ℝ≥0
f : X → Y
hf : HolderOnWith Cf rf f s
hst : MapsTo f s t
x : X
hx : x ∈ s
y : X
hy : y ∈ s
⊢ edist ((g ∘ f) x) ((g ∘ f) y) ≤ ↑Cg * (↑Cf * edist x y ^ ↑rf) ^ ↑rg

tactic: exact hg.edist_le_of_le (hst hx) (hst hy) (hf.edist_le hx hy)
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f✝ : X → Y
s t✝ : Set X
Cg rg : ℝ≥0
g : Y → Z
t : Set Y
hg : HolderOnWith Cg rg g t
Cf rf : ℝ≥0
f : X → Y
hf : HolderOnWith Cf rf f s
hst : MapsTo f s t
x : X
hx : x ∈ s
y : X
hy : y ∈ s
⊢ edist ((g ∘ f) x) ((g ∘ f) y) ≤ ↑Cg * (↑Cf * edist x y ^ ↑rf) ^ ↑rg
state_after: no goals
Theorem: MeasureTheory.Measure.addHaar_closedBall_eq_addHaar_ball
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

tactic: by_cases h : r < 0
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
⊢ μ (closedBall x r) = μ (ball x r)
state_after: case pos
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : r < 0
⊢ μ (closedBall x r) = μ (ball x r)

case neg
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : ¬r < 0
⊢ μ (closedBall x r) = μ (ball x r)

tactic: push_neg at h
state_before: case neg
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : ¬r < 0
⊢ μ (closedBall x r) = μ (ball x r)
state_after: case neg
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : 0 ≤ r
⊢ μ (closedBall x r) = μ (ball x r)

tactic: rw [addHaar_closedBall μ x h, addHaar_ball μ x h]
state_before: case neg
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : 0 ≤ r
⊢ μ (closedBall x r) = μ (ball x r)
state_after: no goals

tactic: rw [Metric.closedBall_eq_empty.mpr h, Metric.ball_eq_empty.mpr h.le]
state_before: case pos
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : μ.IsAddHaarMeasure
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
h : r < 0
⊢ μ (closedBall x r) = μ (ball x r)
state_after: no goals
Theorem: BddAbove.range_comp
File: Mathlib/Order/Bounds/Basic.lean

tactic: change BddAbove (range (g ∘ f))
state_before: α : Type u
β : Type v
γ✝ : Type w
ι : Sort x
γ : Type u_1
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → γ
hf : BddAbove (range f)
hg : Monotone g
⊢ BddAbove (range fun x => g (f x))
state_after: α : Type u
β : Type v
γ✝ : Type w
ι : Sort x
γ : Type u_1
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → γ
hf : BddAbove (range f)
hg : Monotone g
⊢ BddAbove (range (g ∘ f))

tactic: simpa only [Set.range_comp] using hg.map_bddAbove hf
state_before: α : Type u
β : Type v
γ✝ : Type w
ι : Sort x
γ : Type u_1
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → γ
hf : BddAbove (range f)
hg : Monotone g
⊢ BddAbove (range (g ∘ f))
state_after: no goals
Theorem: Polynomial.aeval_modByMonic_eq_self_of_root
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: rw [modByMonic_eq_sub_mul_div p hq, _root_.map_sub, _root_.map_mul, hx, zero_mul,
  sub_zero]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝² : CommRing R
p✝ q✝ : R[X]
inst✝¹ : Ring S
inst✝ : Algebra R S
p q : R[X]
hq : q.Monic
x : S
hx : (aeval x) q = 0
⊢ (aeval x) (p %ₘ q) = (aeval x) p
state_after: no goals
Theorem: ContinuousLinearEquiv.comp_hasFDerivWithinAt_iff'
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: rw [← iso.comp_hasFDerivWithinAt_iff, ← ContinuousLinearMap.comp_assoc, iso.coe_comp_coe_symm,
  ContinuousLinearMap.id_comp]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f'✝ f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s✝ t : Set E
L L₁ L₂ : Filter E
iso : E ≃L[𝕜] F
f : G → E
s : Set G
x : G
f' : G →L[𝕜] F
⊢ HasFDerivWithinAt (⇑iso ∘ f) f' s x ↔ HasFDerivWithinAt f ((↑iso.symm).comp f') s x
state_after: no goals
Theorem: Int.gcd_eq_right
File: Mathlib/Data/Int/GCD.lean

tactic: rw [gcd_comm, gcd_eq_left H]
state_before: i j : ℤ
H : j ∣ i
⊢ i.gcd j = j.natAbs
state_after: no goals
Theorem: CompleteLattice.independent_iff_supIndep_univ
File: Mathlib/Order/SupIndep.lean

tactic: classical
  simp [Finset.supIndep_iff_disjoint_erase, CompleteLattice.Independent, Finset.sup_eq_iSup]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α
inst✝ : Fintype ι
f : ι → α
⊢ Independent f ↔ Finset.univ.SupIndep f
state_after: no goals

tactic: simp [Finset.supIndep_iff_disjoint_erase, CompleteLattice.Independent, Finset.sup_eq_iSup]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α
inst✝ : Fintype ι
f : ι → α
⊢ Independent f ↔ Finset.univ.SupIndep f
state_after: no goals
Theorem: ZMod.pow_div_two_eq_neg_one_or_one
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

tactic: cases' Prime.eq_two_or_odd (@Fact.out p.Prime _) with hp2 hp_odd
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1
state_after: case inl
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp2 : p = 2
⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1

case inr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp_odd : p % 2 = 1
⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1

tactic: rw [← mul_self_eq_one_iff, ← pow_add, ← two_mul, two_mul_odd_div_two hp_odd]
state_before: case inr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp_odd : p % 2 = 1
⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1
state_after: case inr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp_odd : p % 2 = 1
⊢ a ^ (p - 1) = 1

tactic: exact pow_card_sub_one_eq_one ha
state_before: case inr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp_odd : p % 2 = 1
⊢ a ^ (p - 1) = 1
state_after: no goals

tactic: subst p
state_before: case inl
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
hp2 : p = 2
⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1
state_after: case inl
inst✝ : Fact (Nat.Prime 2)
a : ZMod 2
ha : a ≠ 0
⊢ a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1

tactic: revert a ha
state_before: case inl
inst✝ : Fact (Nat.Prime 2)
a : ZMod 2
ha : a ≠ 0
⊢ a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1
state_after: case inl
inst✝ : Fact (Nat.Prime 2)
⊢ ∀ {a : ZMod 2}, a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1

tactic: intro a
state_before: case inl
inst✝ : Fact (Nat.Prime 2)
⊢ ∀ {a : ZMod 2}, a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1
state_after: case inl
inst✝ : Fact (Nat.Prime 2)
a : ZMod 2
⊢ a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1

tactic: fin_cases a
state_before: case inl
inst✝ : Fact (Nat.Prime 2)
a : ZMod 2
⊢ a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1
state_after: case inl.head
inst✝ : Fact (Nat.Prime 2)
⊢ ⟨0, ⋯⟩ ≠ 0 → ⟨0, ⋯⟩ ^ (2 / 2) = 1 ∨ ⟨0, ⋯⟩ ^ (2 / 2) = -1

case inl.tail.head
inst✝ : Fact (Nat.Prime 2)
⊢ ⟨1, ⋯⟩ ≠ 0 → ⟨1, ⋯⟩ ^ (2 / 2) = 1 ∨ ⟨1, ⋯⟩ ^ (2 / 2) = -1

tactic: tauto
state_before: case inl.head
inst✝ : Fact (Nat.Prime 2)
⊢ ⟨0, ⋯⟩ ≠ 0 → ⟨0, ⋯⟩ ^ (2 / 2) = 1 ∨ ⟨0, ⋯⟩ ^ (2 / 2) = -1
state_after: no goals

tactic: simp
state_before: case inl.tail.head
inst✝ : Fact (Nat.Prime 2)
⊢ ⟨1, ⋯⟩ ≠ 0 → ⟨1, ⋯⟩ ^ (2 / 2) = 1 ∨ ⟨1, ⋯⟩ ^ (2 / 2) = -1
state_after: no goals
Theorem: MeasureTheory.ae_iff_measure_eq
File: Mathlib/MeasureTheory/Measure/Typeclasses.lean

tactic: rw [← ae_eq_univ_iff_measure_eq hp, eventuallyEq_univ, eventually_iff]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : IsFiniteMeasure μ
p : α → Prop
hp : NullMeasurableSet {a | p a} μ
⊢ (∀ᵐ (a : α) ∂μ, p a) ↔ μ {a | p a} = μ univ
state_after: no goals
Theorem: Vector.not_empty_toList
File: Mathlib/Data/Vector/Basic.lean

tactic: simp only [empty_toList_eq_ff, Bool.coe_sort_false, not_false_iff]
state_before: n : ℕ
α : Type u_1
v : Vector α (n + 1)
⊢ ¬v.toList.isEmpty = true
state_after: no goals
Theorem: ModularGroup.eq_smul_self_of_mem_fdo_mem_fdo
File: Mathlib/NumberTheory/Modular.lean

tactic: obtain ⟨n, hn⟩ := exists_eq_T_zpow_of_c_eq_zero (c_eq_zero hz hg)
state_before: g : SL(2, ℤ)
z : ℍ
hz : z ∈ 𝒟ᵒ
hg : g • z ∈ 𝒟ᵒ
⊢ z = g • z
state_after: case intro
g : SL(2, ℤ)
z : ℍ
hz : z ∈ 𝒟ᵒ
hg : g • z ∈ 𝒟ᵒ
n : ℤ
hn : ∀ (z : ℍ), g • z = T ^ n • z
⊢ z = g • z

tactic: rw [hn] at hg ⊢
state_before: case intro
g : SL(2, ℤ)
z : ℍ
hz : z ∈ 𝒟ᵒ
hg : g • z ∈ 𝒟ᵒ
n : ℤ
hn : ∀ (z : ℍ), g • z = T ^ n • z
⊢ z = g • z
state_after: case intro
g : SL(2, ℤ)
z : ℍ
hz : z ∈ 𝒟ᵒ
n : ℤ
hg : T ^ n • z ∈ 𝒟ᵒ
hn : ∀ (z : ℍ), g • z = T ^ n • z
⊢ z = T ^ n • z

tactic: simp [eq_zero_of_mem_fdo_of_T_zpow_mem_fdo hz hg, one_smul]
state_before: case intro
g : SL(2, ℤ)
z : ℍ
hz : z ∈ 𝒟ᵒ
n : ℤ
hg : T ^ n • z ∈ 𝒟ᵒ
hn : ∀ (z : ℍ), g • z = T ^ n • z
⊢ z = T ^ n • z
state_after: no goals
Theorem: NonUnitalAlgHom.snd_prod
File: Mathlib/Algebra/Algebra/NonUnitalHom.lean

tactic: rfl
state_before: R : Type u
S : Type u₁
T : Type u_1
inst✝¹² : Monoid R
inst✝¹¹ : Monoid S
inst✝¹⁰ : Monoid T
φ : R →* S
A : Type v
B : Type w
C : Type w₁
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : DistribMulAction R A
inst✝⁷ : NonUnitalNonAssocSemiring B
inst✝⁶ : DistribMulAction S B
inst✝⁵ : NonUnitalNonAssocSemiring C
inst✝⁴ : DistribMulAction T C
φ' : S →* R
ψ : S →* T
χ : R →* T
B₁ : Type u_2
inst✝³ : NonUnitalNonAssocSemiring B₁
inst✝² : DistribMulAction R B₁
inst✝¹ : DistribMulAction R B
inst✝ : DistribMulAction R C
f : A →ₙₐ[R] B
g : A →ₙₐ[R] C
⊢ (snd R B C).comp (f.prod g) = g
state_after: no goals
Theorem: HasDerivAt.scomp_hasDerivWithinAt_of_eq
File: Mathlib/Analysis/Calculus/Deriv/Comp.lean

tactic: rw [hy] at hg
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 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hg : HasDerivAt g₁ g₁' y
hh : HasDerivWithinAt h h' s x
hy : y = h x
⊢ HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x
state_after: 𝕜 : 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 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hg : HasDerivAt g₁ g₁' (h x)
hh : HasDerivWithinAt h h' s x
hy : y = h x
⊢ HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x

tactic: exact hg.scomp_hasDerivWithinAt x hh
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 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hg : HasDerivAt g₁ g₁' (h x)
hh : HasDerivWithinAt h h' s x
hy : y = h x
⊢ HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x
state_after: no goals
Theorem: USize.size_eq
File: .lake/packages/batteries/Batteries/Data/UInt.lean

tactic: have : 1 ≤ 2 ^ System.Platform.numBits := Nat.succ_le_of_lt (Nat.two_pow_pos _)
state_before: ⊢ size = 2 ^ System.Platform.numBits
state_after: this : 1 ≤ 2 ^ System.Platform.numBits
⊢ size = 2 ^ System.Platform.numBits

tactic: rw [USize.size, Nat.sub_add_cancel this]
state_before: this : 1 ≤ 2 ^ System.Platform.numBits
⊢ size = 2 ^ System.Platform.numBits
state_after: no goals
Theorem: SimpleGraph.Walk.support_dropUntil_subset
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [← take_spec p h, mem_support_append_iff]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x✝ y : V
inst✝ : DecidableEq V
u v w : V
p : G.Walk v w
h : u ∈ p.support
x : V
hx : x ∈ (p.dropUntil u h).support
⊢ x ∈ p.support
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x✝ y : V
inst✝ : DecidableEq V
u v w : V
p : G.Walk v w
h : u ∈ p.support
x : V
hx : x ∈ (p.dropUntil u h).support
⊢ x ∈ (p.takeUntil u h).support ∨ x ∈ (p.dropUntil u h).support

tactic: exact Or.inr hx
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x✝ y : V
inst✝ : DecidableEq V
u v w : V
p : G.Walk v w
h : u ∈ p.support
x : V
hx : x ∈ (p.dropUntil u h).support
⊢ x ∈ (p.takeUntil u h).support ∨ x ∈ (p.dropUntil u h).support
state_after: no goals