1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.sFiniteSeq_absolutelyContinuous_toFiniteAux
File: Mathlib/MeasureTheory/Measure/WithDensityFinite.lean

tactic: refine Measure.absolutelyContinuous_sum_right n (Measure.absolutelyContinuous_smul ?_)
state_before: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ sFiniteSeq μ n ≪ μ.toFiniteAux
state_after: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ (2 ^ (n + 1) * (sFiniteSeq μ n) Set.univ)⁻¹ ≠ 0

tactic: simp only [ne_eq, ENNReal.inv_eq_zero]
state_before: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ (2 ^ (n + 1) * (sFiniteSeq μ n) Set.univ)⁻¹ ≠ 0
state_after: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ ¬2 ^ (n + 1) * (sFiniteSeq μ n) Set.univ = ⊤

tactic: exact ENNReal.mul_ne_top (by simp) (measure_ne_top _ _)
state_before: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ ¬2 ^ (n + 1) * (sFiniteSeq μ n) Set.univ = ⊤
state_after: no goals

tactic: simp
state_before: α : Type u_1
mα : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
n : ℕ
⊢ 2 ^ (n + 1) ≠ ⊤
state_after: no goals
Theorem: le_inv_mul_iff_mul_le
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_le_mul_iff_left a]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ b ≤ a⁻¹ * c ↔ a * b ≤ c
state_after: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a * b ≤ a * (a⁻¹ * c) ↔ a * b ≤ c

tactic: simp
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a * b ≤ a * (a⁻¹ * c) ↔ a * b ≤ c
state_after: no goals
Theorem: AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nontrivial
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rcases s.eq_empty_or_nonempty with hs | hs
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
inst✝ : Nontrivial P
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤
state_after: case inl
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
inst✝ : Nontrivial P
hs : s = ∅
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤

case inr
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
inst✝ : Nontrivial P
hs : s.Nonempty
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤

tactic: simp [hs, subsingleton_iff_bot_eq_top, AddTorsor.subsingleton_iff V P, not_subsingleton]
state_before: case inl
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
inst✝ : Nontrivial P
hs : s = ∅
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤
state_after: no goals

tactic: rw [affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty k V P hs]
state_before: case inr
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
inst✝ : Nontrivial P
hs : s.Nonempty
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤
state_after: no goals
Theorem: Filter.prod_principal_principal
File: Mathlib/Order/Filter/Prod.lean

tactic: simp only [SProd.sprod, Filter.prod, comap_principal, principal_eq_iff_eq, comap_principal,
  inf_principal]
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 β
s : Set α
t : Set β
⊢ 𝓟 s ×ˢ 𝓟 t = 𝓟 (s ×ˢ t)
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 β
s : Set α
t : Set β
⊢ Prod.fst ⁻¹' s ∩ Prod.snd ⁻¹' t = s.prod t

tactic: 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 β
s : Set α
t : Set β
⊢ Prod.fst ⁻¹' s ∩ Prod.snd ⁻¹' t = s.prod t
state_after: no goals
Theorem: padicValRat.self
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: simp [hp]
state_before: p : ℕ
hp : 1 < p
⊢ padicValRat p ↑p = 1
state_after: no goals
Theorem: IsClosed.mem_iff_infDist_zero
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [← mem_closure_iff_infDist_zero hs, h.closure_eq]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
h : IsClosed s
hs : s.Nonempty
⊢ x ∈ s ↔ infDist x s = 0
state_after: no goals
Theorem: CircleDeg1Lift.commute_nat_add
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simpa only [nsmul_one, add_left_iterate] using Function.Commute.iterate_right f.map_one_add n
state_before: f g : CircleDeg1Lift
n : ℕ
⊢ Function.Commute ⇑f fun x => ↑n + x
state_after: no goals
Theorem: abs_eq
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: refine ⟨eq_or_eq_neg_of_abs_eq, ?_⟩
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
hb : 0 ≤ b
⊢ |a| = b ↔ a = b ∨ a = -b
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
hb : 0 ≤ b
⊢ a = b ∨ a = -b → |a| = b

tactic: rintro (rfl | rfl) <;> simp only [abs_neg, abs_of_nonneg hb]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
hb : 0 ≤ b
⊢ a = b ∨ a = -b → |a| = b
state_after: no goals
Theorem: PiNat.self_mem_cylinder
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: simp
state_before: E : ℕ → Type u_1
x : (n : ℕ) → E n
n : ℕ
⊢ x ∈ cylinder x n
state_after: no goals
Theorem: MeasureTheory.BorelCantelli.predictablePart_process_ae_eq
File: Mathlib/Probability/Martingale/BorelCantelli.lean

tactic: have := martingalePart_process_ae_eq ℱ μ s n
state_before: Ω : Type u_1
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ✝ : Filtration ℕ m0
f : ℕ → Ω → ℝ
ω : Ω
r : ℝ
R : ℝ≥0
s✝ : ℕ → Set Ω
ℱ : Filtration ℕ m0
μ : Measure Ω
s : ℕ → Set Ω
n : ℕ
⊢ predictablePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, μ[(s (k + 1)).indicator 1|↑ℱ k]
state_after: Ω : Type u_1
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ✝ : Filtration ℕ m0
f : ℕ → Ω → ℝ
ω : Ω
r : ℝ
R : ℝ≥0
s✝ : ℕ → Set Ω
ℱ : Filtration ℕ m0
μ : Measure Ω
s : ℕ → Set Ω
n : ℕ
this :
  martingalePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, ((s (k + 1)).indicator 1 - μ[(s (k + 1)).indicator 1|↑ℱ k])
⊢ predictablePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, μ[(s (k + 1)).indicator 1|↑ℱ k]

tactic: simp_rw [martingalePart, process, Finset.sum_sub_distrib] at this
state_before: Ω : Type u_1
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ✝ : Filtration ℕ m0
f : ℕ → Ω → ℝ
ω : Ω
r : ℝ
R : ℝ≥0
s✝ : ℕ → Set Ω
ℱ : Filtration ℕ m0
μ : Measure Ω
s : ℕ → Set Ω
n : ℕ
this :
  martingalePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, ((s (k + 1)).indicator 1 - μ[(s (k + 1)).indicator 1|↑ℱ k])
⊢ predictablePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, μ[(s (k + 1)).indicator 1|↑ℱ k]
state_after: Ω : Type u_1
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ✝ : Filtration ℕ m0
f : ℕ → Ω → ℝ
ω : Ω
r : ℝ
R : ℝ≥0
s✝ : ℕ → Set Ω
ℱ : Filtration ℕ m0
μ : Measure Ω
s : ℕ → Set Ω
n : ℕ
this :
  ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 - predictablePart (process s) ℱ μ n =
    ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 - ∑ x ∈ Finset.range n, μ[(s (x + 1)).indicator 1|↑ℱ x]
⊢ predictablePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, μ[(s (k + 1)).indicator 1|↑ℱ k]

tactic: exact sub_right_injective this
state_before: Ω : Type u_1
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ✝ : Filtration ℕ m0
f : ℕ → Ω → ℝ
ω : Ω
r : ℝ
R : ℝ≥0
s✝ : ℕ → Set Ω
ℱ : Filtration ℕ m0
μ : Measure Ω
s : ℕ → Set Ω
n : ℕ
this :
  ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 - predictablePart (process s) ℱ μ n =
    ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 - ∑ x ∈ Finset.range n, μ[(s (x + 1)).indicator 1|↑ℱ x]
⊢ predictablePart (process s) ℱ μ n = ∑ k ∈ Finset.range n, μ[(s (k + 1)).indicator 1|↑ℱ k]
state_after: no goals
Theorem: Real.arccos_pos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: simp [arccos]
state_before: x✝ y x : ℝ
⊢ 0 < arccos x ↔ x < 1
state_after: no goals
Theorem: selfAdjoint.mem_iff
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: rw [← AddSubgroup.mem_carrier]
state_before: R : Type u_1
A : Type u_2
inst✝¹ : AddGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ selfAdjoint R ↔ star x = x
state_after: R : Type u_1
A : Type u_2
inst✝¹ : AddGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ (selfAdjoint R).carrier ↔ star x = x

tactic: exact Iff.rfl
state_before: R : Type u_1
A : Type u_2
inst✝¹ : AddGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ (selfAdjoint R).carrier ↔ star x = x
state_after: no goals
Theorem: Polynomial.eval₂_restriction
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: simp only [eval₂_eq_sum, sum, support_restriction, ← @coeff_restriction _ _ p, RingHom.comp_apply,
  Subring.coeSubtype]
state_before: R : Type u
S : Type u_1
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
⊢ eval₂ f x p = eval₂ (f.comp (Subring.closure ↑p.coeffs).subtype) x p.restriction
state_after: no goals
Theorem: rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

tactic: exact rpow_mul_exp_neg_mul_rpow_isLittleO_exp_neg s one_lt_two hb
state_before: b : ℝ
hb : 0 < b
s : ℝ
⊢ (fun x => x ^ s * rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-(1 / 2) * x)
state_after: no goals
Theorem: MeasureTheory.Measure.mapₗ_eq_zero_iff
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [mapₗ_apply_of_measurable hf, map_eq_zero_iff hf.aemeasurable]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f : α → β
hf : Measurable f
⊢ (mapₗ f) μ = 0 ↔ μ = 0
state_after: no goals
Theorem: List.getLast?_append_cons
File: Mathlib/Data/List/Basic.lean

tactic: rw [cons_append, cons_append, getLast?_cons_cons,
← cons_append, getLast?_append_cons (c :: l₁)]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁✝ l₂✝ : List α
b c : α
l₁ : List α
a : α
l₂ : List α
⊢ (b :: c :: l₁ ++ a :: l₂).getLast? = (a :: l₂).getLast?
state_after: no goals
Theorem: WittVector.ext_iff
File: Mathlib/RingTheory/WittVector/Defs.lean

tactic: rw [h]
state_before: p : ℕ
R : Type u_1
x y : 𝕎 R
h : x = y
n : ℕ
⊢ x.coeff n = y.coeff n
state_after: no goals
Theorem: isOpen_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: simp only [isOpen_iff_mem_nhds, nhds_eq_comap_uniformity, mem_comap_prod_mk]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
s : Set α
⊢ IsOpen s ↔ ∀ x ∈ s, {p | p.1 = x → p.2 ∈ s} ∈ 𝓤 α
state_after: no goals
Theorem: Set.preimage_congr
File: Mathlib/Data/Set/Image.lean

tactic: congr with x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
g✝ : β → γ
f g : α → β
s : Set β
h : ∀ (x : α), f x = g x
⊢ f ⁻¹' s = g ⁻¹' s
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
g✝ : β → γ
f g : α → β
s : Set β
h : ∀ (x : α), f x = g x
x : α
⊢ x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s

tactic: simp [h]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
g✝ : β → γ
f g : α → β
s : Set β
h : ∀ (x : α), f x = g x
x : α
⊢ x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s
state_after: no goals
Theorem: HurwitzZeta.completedHurwitzZetaEven₀_one_sub
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: rw [completedHurwitzZetaEven₀, completedCosZeta₀, sub_div,
  (by norm_num : (1 / 2 : ℂ) = ↑(1 / 2 : ℝ)),
  (by rfl : (1 / 2 : ℝ) = (hurwitzEvenFEPair a).k),
  (hurwitzEvenFEPair a).functional_equation₀ (s / 2),
  (by rfl : (hurwitzEvenFEPair a).ε = 1),
  one_smul]
state_before: a : UnitAddCircle
s : ℂ
⊢ completedHurwitzZetaEven₀ a (1 - s) = completedCosZeta₀ a s
state_after: no goals

tactic: norm_num
state_before: a : UnitAddCircle
s : ℂ
⊢ 1 / 2 = ↑(1 / 2)
state_after: no goals

tactic: rfl
state_before: a : UnitAddCircle
s : ℂ
⊢ 1 / 2 = (hurwitzEvenFEPair a).k
state_after: no goals

tactic: rfl
state_before: a : UnitAddCircle
s : ℂ
⊢ (hurwitzEvenFEPair a).ε = 1
state_after: no goals
Theorem: SimpleGraph.subgraphOfAdj_symm
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext <;> simp [or_comm, and_comm]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
⊢ G.subgraphOfAdj ⋯ = G.subgraphOfAdj hvw
state_after: no goals
Theorem: AffineIndependent.finrank_vectorSpan
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: classical
rw [← Finset.card_univ] at hc
rw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]
exact hi.finrank_vectorSpan_image_finset hc
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Fintype.card ι = n + 1
⊢ finrank k ↥(vectorSpan k (Set.range p)) = n
state_after: no goals

tactic: rw [← Finset.card_univ] at hc
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Fintype.card ι = n + 1
⊢ finrank k ↥(vectorSpan k (Set.range p)) = n
state_after: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Finset.univ.card = n + 1
⊢ finrank k ↥(vectorSpan k (Set.range p)) = n

tactic: rw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Finset.univ.card = n + 1
⊢ finrank k ↥(vectorSpan k (Set.range p)) = n
state_after: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Finset.univ.card = n + 1
⊢ finrank k ↥(vectorSpan k ↑(Finset.image p Finset.univ)) = n

tactic: exact hi.finrank_vectorSpan_image_finset hc
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
hi : AffineIndependent k p
n : ℕ
hc : Finset.univ.card = n + 1
⊢ finrank k ↥(vectorSpan k ↑(Finset.image p Finset.univ)) = n
state_after: no goals
Theorem: Turing.PartrecToTM2.unrev_ok
File: Mathlib/Computability/TMToPartrec.lean

tactic: decide
state_before: q : Λ'
s : Option Γ'
S : K' → List Γ'
⊢ rev ≠ main
state_after: no goals
Theorem: Rat.isSquare_iff
File: Mathlib/Data/Rat/Lemmas.lean

tactic: constructor
state_before: q : ℚ
⊢ IsSquare q ↔ IsSquare q.num ∧ IsSquare q.den
state_after: case mp
q : ℚ
⊢ IsSquare q → IsSquare q.num ∧ IsSquare q.den

case mpr
q : ℚ
⊢ IsSquare q.num ∧ IsSquare q.den → IsSquare q

tactic: rintro ⟨qr, rfl⟩
state_before: case mp
q : ℚ
⊢ IsSquare q → IsSquare q.num ∧ IsSquare q.den
state_after: case mp.intro
qr : ℚ
⊢ IsSquare (qr * qr).num ∧ IsSquare (qr * qr).den

tactic: rw [Rat.mul_self_num, mul_self_den]
state_before: case mp.intro
qr : ℚ
⊢ IsSquare (qr * qr).num ∧ IsSquare (qr * qr).den
state_after: case mp.intro
qr : ℚ
⊢ IsSquare (qr.num * qr.num) ∧ IsSquare (qr.den * qr.den)

tactic: simp only [isSquare_mul_self, and_self]
state_before: case mp.intro
qr : ℚ
⊢ IsSquare (qr.num * qr.num) ∧ IsSquare (qr.den * qr.den)
state_after: no goals

tactic: rintro ⟨⟨nr, hnr⟩, ⟨dr, hdr⟩⟩
state_before: case mpr
q : ℚ
⊢ IsSquare q.num ∧ IsSquare q.den → IsSquare q
state_after: case mpr.intro.intro.intro
q : ℚ
nr : ℤ
hnr : q.num = nr * nr
dr : ℕ
hdr : q.den = dr * dr
⊢ IsSquare q

tactic: refine ⟨nr / dr, ?_⟩
state_before: case mpr.intro.intro.intro
q : ℚ
nr : ℤ
hnr : q.num = nr * nr
dr : ℕ
hdr : q.den = dr * dr
⊢ IsSquare q
state_after: case mpr.intro.intro.intro
q : ℚ
nr : ℤ
hnr : q.num = nr * nr
dr : ℕ
hdr : q.den = dr * dr
⊢ q = ↑nr / ↑dr * (↑nr / ↑dr)

tactic: rw [div_mul_div_comm, ← Int.cast_mul, ← Nat.cast_mul, ← hnr, ← hdr, num_div_den]
state_before: case mpr.intro.intro.intro
q : ℚ
nr : ℤ
hnr : q.num = nr * nr
dr : ℕ
hdr : q.den = dr * dr
⊢ q = ↑nr / ↑dr * (↑nr / ↑dr)
state_after: no goals
Theorem: CategoryTheory.shiftFunctorAdd_add_zero_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: dsimp
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (𝟭 C).obj ((shiftFunctor C a).obj X) = (shiftFunctor C (a + 0)).obj X
state_after: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (shiftFunctor C a).obj X = (shiftFunctor C (a + 0)).obj X

tactic: rw [add_zero]
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (shiftFunctor C a).obj X = (shiftFunctor C (a + 0)).obj X
state_after: no goals

tactic: simp [← shiftFunctorAdd'_add_zero_inv_app, shiftFunctorAdd']
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (shiftFunctorAdd C a 0).inv.app X = (shiftFunctorZero C A).hom.app ((shiftFunctor C a).obj X) ≫ eqToHom ⋯
state_after: no goals
Theorem: le_max_of_sq_le_mul
File: Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean

tactic: simpa using min_le_max_of_mul_le_mul ((pow_two _).symm.trans_le h)
state_before: β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : M
h : a ^ 2 ≤ b * c
⊢ a ≤ max b c
state_after: no goals
Theorem: Equiv.Perm.ne_and_ne_of_swap_mul_apply_ne_self
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: simp only [swap_apply_def, mul_apply, f.injective.eq_iff] at *
state_before: α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (swap x (f x) * f) y ≠ y
⊢ f y ≠ y ∧ y ≠ x
state_after: α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
⊢ f y ≠ y ∧ y ≠ x

tactic: by_cases h : f y = x
state_before: α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
⊢ f y ≠ y ∧ y ≠ x
state_after: case pos
α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
h : f y = x
⊢ f y ≠ y ∧ y ≠ x

case neg
α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
h : ¬f y = x
⊢ f y ≠ y ∧ y ≠ x

tactic: constructor <;> intro <;> simp_all only [if_true, eq_self_iff_true, not_true, Ne]
state_before: case pos
α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
h : f y = x
⊢ f y ≠ y ∧ y ≠ x
state_after: no goals

tactic: split_ifs at hy with h <;> try { simp [*] at * }
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
hy : (if f y = x then f x else if y = x then x else f y) ≠ y
h : ¬f y = x
⊢ f y ≠ y ∧ y ≠ x
state_after: no goals

tactic: simp [*] at *
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
f : Perm α
x y : α
h✝ : ¬f y = x
h : ¬y = x
hy : f y ≠ y
⊢ f y ≠ y ∧ y ≠ x
state_after: no goals
Theorem: Num.mod_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp
state_before: ⊢ ↑(0 % 0) = ↑0 % ↑0
state_after: no goals
Theorem: Finset.univ_val_map_subtype_restrict
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← univ_val_map_subtype_val, Multiset.map_map, Subtype.restrict_def]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Fintype α
s t : Finset α
inst✝² : Fintype α
f : α → β
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype { a // p a }
⊢ Multiset.map (Subtype.restrict p f) univ.val = Multiset.map f (filter p univ).val
state_after: no goals
Theorem: PartialHomeomorph.extend_preimage_inter_eq
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: mfld_set_tac
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
⊢ ↑(f.extend I).symm ⁻¹' (s ∩ t) ∩ range ↑I = ↑(f.extend I).symm ⁻¹' s ∩ range ↑I ∩ ↑(f.extend I).symm ⁻¹' t
state_after: no goals
Theorem: isRegular_star_iff
File: Mathlib/Algebra/Star/Basic.lean

tactic: rw [isRegular_iff, isRegular_iff, isRightRegular_star_iff, isLeftRegular_star_iff, and_comm]
state_before: R : Type u
inst✝¹ : Mul R
inst✝ : StarMul R
x : R
⊢ IsRegular (star x) ↔ IsRegular x
state_after: no goals
Theorem: accPt_iff_frequently
File: Mathlib/Topology/Basic.lean

tactic: simp [acc_principal_iff_cluster, clusterPt_principal_iff_frequently, and_comm]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
x : X
C : Set X
⊢ AccPt x (𝓟 C) ↔ ∃ᶠ (y : X) in 𝓝 x, y ≠ x ∧ y ∈ C
state_after: no goals
Theorem: Set.Ici_iSup₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [Ici_iSup]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
inst✝ : CompleteLattice α
f : (i : ι) → κ i → α
⊢ Ici (⨆ i, ⨆ j, f i j) = ⋂ i, ⋂ j, Ici (f i j)
state_after: no goals
Theorem: FirstOrder.Language.BoundedFormula.inf_semanticallyEquivalent_not_sup_not
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: simp
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ ψ : L.BoundedFormula α n
M : T.ModelType
v : α → ↑M
xs : Fin n → ↑M
⊢ (φ ⊓ ψ ⇔ ∼(∼φ ⊔ ∼ψ)).Realize v xs
state_after: no goals
Theorem: SMulPosReflectLT.lift
File: Mathlib/Algebra/Order/Module/Defs.lean

tactic: simp only [← hf, ← lt_iff_lt_of_le_iff_le' hf hf, zero, smul] at *
state_before: α : Type u_1
β : Type u_2
a a₁✝ a₂✝ : α
b✝ b₁ b₂ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂
smul : ∀ (a : α) (b : β), f (a • b) = a • f b
zero : f 0 = 0
inst✝ : SMulPosReflectLT α γ
b : β
hb : 0 ≤ b
a₁ a₂ : α
h : a₁ • b < a₂ • b
⊢ a₁ < a₂
state_after: α : Type u_1
β : Type u_2
a a₁✝ a₂✝ : α
b✝ b₁ b₂ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
inst✝ : SMulPosReflectLT α γ
b : β
a₁ a₂ : α
hf : ∀ {b₁ b₂ : β}, True
smul : α → β → True
zero : True
hb : 0 ≤ f b
h : a₁ • f b < a₂ • f b
⊢ a₁ < a₂

tactic: exact lt_of_smul_lt_smul_right h hb
state_before: α : Type u_1
β : Type u_2
a a₁✝ a₂✝ : α
b✝ b₁ b₂ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
inst✝ : SMulPosReflectLT α γ
b : β
a₁ a₂ : α
hf : ∀ {b₁ b₂ : β}, True
smul : α → β → True
zero : True
hb : 0 ≤ f b
h : a₁ • f b < a₂ • f b
⊢ a₁ < a₂
state_after: no goals