1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: HasDerivAt.hasGradientAt
File: Mathlib/Analysis/Calculus/Gradient/Basic.lean

tactic: rw [hasGradientAt_iff_hasFDerivAt, hasFDerivAt_iff_hasDerivAt]
state_before: 𝕜 : Type u_1
F : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace F
f : F → 𝕜
f' x : F
s : Set F
L : Filter F
g : 𝕜 → 𝕜
g' u : 𝕜
L' : Filter 𝕜
h : HasDerivAt g g' u
⊢ HasGradientAt g ((starRingEnd 𝕜) g') u
state_after: 𝕜 : Type u_1
F : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace F
f : F → 𝕜
f' x : F
s : Set F
L : Filter F
g : 𝕜 → 𝕜
g' u : 𝕜
L' : Filter 𝕜
h : HasDerivAt g g' u
⊢ HasDerivAt g (((toDual 𝕜 𝕜) ((starRingEnd 𝕜) g')) 1) u

tactic: simpa
state_before: 𝕜 : Type u_1
F : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace F
f : F → 𝕜
f' x : F
s : Set F
L : Filter F
g : 𝕜 → 𝕜
g' u : 𝕜
L' : Filter 𝕜
h : HasDerivAt g g' u
⊢ HasDerivAt g (((toDual 𝕜 𝕜) ((starRingEnd 𝕜) g')) 1) u
state_after: no goals
Theorem: Nat.dist_eq_sub_of_le_right
File: Mathlib/Data/Nat/Dist.lean

tactic: rw [dist_comm]
state_before: n m : ℕ
h : m ≤ n
⊢ n.dist m = n - m
state_after: n m : ℕ
h : m ≤ n
⊢ m.dist n = n - m

tactic: apply dist_eq_sub_of_le h
state_before: n m : ℕ
h : m ≤ n
⊢ m.dist n = n - m
state_after: no goals
Theorem: exists_isOpen_superset_and_isCompact_closure
File: Mathlib/Topology/Separation.lean

tactic: rcases exists_compact_superset hK with ⟨K', hK', hKK'⟩
state_before: X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : FirstCountableTopology X
inst✝¹ : R1Space X
x y : X
inst✝ : WeaklyLocallyCompactSpace X
K : Set X
hK : IsCompact K
⊢ ∃ V, IsOpen V ∧ K ⊆ V ∧ IsCompact (closure V)
state_after: case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : FirstCountableTopology X
inst✝¹ : R1Space X
x y : X
inst✝ : WeaklyLocallyCompactSpace X
K : Set X
hK : IsCompact K
K' : Set X
hK' : IsCompact K'
hKK' : K ⊆ interior K'
⊢ ∃ V, IsOpen V ∧ K ⊆ V ∧ IsCompact (closure V)

tactic: exact ⟨interior K', isOpen_interior, hKK', hK'.closure_of_subset interior_subset⟩
state_before: case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : FirstCountableTopology X
inst✝¹ : R1Space X
x y : X
inst✝ : WeaklyLocallyCompactSpace X
K : Set X
hK : IsCompact K
K' : Set X
hK' : IsCompact K'
hKK' : K ⊆ interior K'
⊢ ∃ V, IsOpen V ∧ K ⊆ V ∧ IsCompact (closure V)
state_after: no goals
Theorem: OnePoint.continuousAt_coe
File: Mathlib/Topology/Compactification/OnePoint.lean

tactic: rw [ContinuousAt, nhds_coe_eq, tendsto_map'_iff, ContinuousAt]
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
x : X
⊢ ContinuousAt f ↑x ↔ ContinuousAt (f ∘ some) x
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
x : X
⊢ Tendsto (f ∘ some) (𝓝 x) (𝓝 (f ↑x)) ↔ Tendsto (f ∘ some) (𝓝 x) (𝓝 ((f ∘ some) x))

tactic: rfl
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
x : X
⊢ Tendsto (f ∘ some) (𝓝 x) (𝓝 (f ↑x)) ↔ Tendsto (f ∘ some) (𝓝 x) (𝓝 ((f ∘ some) x))
state_after: no goals
Theorem: MvPolynomial.rename_esymm
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

tactic: simp_rw [esymm, map_sum, map_prod, rename_X]
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ (rename ⇑e) (esymm σ R n) = ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i)
state_after: no goals

tactic: simp [powersetCard_map, -map_univ_equiv]
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i) = ∑ t ∈ powersetCard n (Finset.map e.toEmbedding univ), ∏ i ∈ t, X i
state_after: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i) = ∑ x ∈ powersetCard n univ, ∏ i ∈ (mapEmbedding e.toEmbedding) x, X i

tactic: dsimp [mapEmbedding, OrderEmbedding.ofMapLEIff]
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i) = ∑ x ∈ powersetCard n univ, ∏ i ∈ (mapEmbedding e.toEmbedding) x, X i
state_after: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i) = ∑ x ∈ powersetCard n univ, ∏ i ∈ Finset.map e.toEmbedding x, X i

tactic: simp
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ x ∈ powersetCard n univ, ∏ i ∈ x, X (e i) = ∑ x ∈ powersetCard n univ, ∏ i ∈ Finset.map e.toEmbedding x, X i
state_after: no goals

tactic: rw [map_univ_equiv]
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
e : σ ≃ τ
⊢ ∑ t ∈ powersetCard n (Finset.map e.toEmbedding univ), ∏ i ∈ t, X i = ∑ t ∈ powersetCard n univ, ∏ i ∈ t, X i
state_after: no goals
Theorem: one_div_le_neg_one
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rwa [one_div_neg_one_eq_neg_one] at this
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
h1 : a < 0
h2 : -1 ≤ a
this : 1 / a ≤ 1 / -1
⊢ 1 / a ≤ -1
state_after: no goals
Theorem: MeasurableSpace.measurableSet_iInf
File: Mathlib/MeasureTheory/MeasurableSpace/Defs.lean

tactic: rw [iInf, measurableSet_sInf, forall_mem_range]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι✝ : Sort u_6
s✝ t u : Set α
ι : Sort u_7
m : ι → MeasurableSpace α
s : Set α
⊢ MeasurableSet s ↔ ∀ (i : ι), MeasurableSet s
state_after: no goals
Theorem: Complex.AbsTheory.abs_mul
File: Mathlib/Data/Complex/Abs.lean

tactic: rw [normSq_mul, Real.sqrt_mul (normSq_nonneg _)]
state_before: z w : ℂ
⊢ (abs z * w) = (abs z) * abs w
state_after: no goals
Theorem: LinearMap.quotientInfEquivSupQuotient_injective
File: Mathlib/LinearAlgebra/Isomorphisms.lean

tactic: rw [← ker_eq_bot, quotientInfToSupQuotient, ker_liftQ_eq_bot]
state_before: R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ Function.Injective ⇑(quotientInfToSupQuotient p p')
state_after: case h'
R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ ker (subToSupQuotient p p') ≤ comap p.subtype (p ⊓ p')

tactic: rw [ker_comp, ker_mkQ]
state_before: case h'
R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ ker (subToSupQuotient p p') ≤ comap p.subtype (p ⊓ p')
state_after: case h'
R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ comap (inclusion ⋯) (comap (p ⊔ p').subtype p') ≤ comap p.subtype (p ⊓ p')

tactic: exact fun ⟨x, hx1⟩ hx2 => ⟨hx1, hx2⟩
state_before: case h'
R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ comap (inclusion ⋯) (comap (p ⊔ p').subtype p') ≤ comap p.subtype (p ⊓ p')
state_after: no goals
Theorem: Polynomial.toLaurent_C_mul_T
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: rw [toFinsupp_monomial, Finsupp.mapDomain_single, single_eq_C_mul_T]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
r : R
⊢ Finsupp.mapDomain Nat.cast ((monomial n) r).toFinsupp = C r * T ↑n
state_after: no goals
Theorem: RelIso.minimals_preimage_eq
File: Mathlib/Order/Minimal.lean

tactic: convert f.toRelEmbedding.minimals_preimage_eq y
state_before: α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b : α
inst✝ : PartialOrder α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
f : r ≃r s
y : Set β
⊢ minimals r (⇑f ⁻¹' y) = ⇑f ⁻¹' minimals s y
state_after: case h.e'_3.h.e'_4.h.e'_3
α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b : α
inst✝ : PartialOrder α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
f : r ≃r s
y : Set β
⊢ y = y ∩ range ⇑f.toRelEmbedding

tactic: simp
state_before: case h.e'_3.h.e'_4.h.e'_3
α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b : α
inst✝ : PartialOrder α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
f : r ≃r s
y : Set β
⊢ y = y ∩ range ⇑f.toRelEmbedding
state_after: no goals
Theorem: List.Sublist.filterMap
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: induction s <;> simp [filterMap_cons] <;> split <;> simp [*, cons, cons₂]
state_before: α : Type u_1
β : Type u_2
l₁ l₂ : List α
f : α → Option β
s : l₁ <+ l₂
⊢ filterMap f l₁ <+ filterMap f l₂
state_after: no goals
Theorem: Finset.mem_pow
File: Mathlib/Data/Finset/Pointwise.lean

tactic: set_option tactic.skipAssignedInstances false in
simp [← mem_coe, coe_pow, Set.mem_pow]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
⊢ a ∈ s ^ n ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a
state_after: no goals

tactic: simp [← mem_coe, coe_pow, Set.mem_pow]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
⊢ a ∈ s ^ n ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a
state_after: no goals
Theorem: Finset.prod_filter_of_ne
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: classical
  rw [not_imp_comm, mem_filter]
  exact fun h₁ h₂ => ⟨h₁, by simpa using hp _ h₁ h₂⟩
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
⊢ x ∈ s → x ∉ filter p s → f x = 1
state_after: no goals

tactic: rw [not_imp_comm, mem_filter]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
⊢ x ∈ s → x ∉ filter p s → f x = 1
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
⊢ x ∈ s → ¬f x = 1 → x ∈ s ∧ p x

tactic: exact fun h₁ h₂ => ⟨h₁, by simpa using hp _ h₁ h₂⟩
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
⊢ x ∈ s → ¬f x = 1 → x ∈ s ∧ p x
state_after: no goals

tactic: simpa using hp _ h₁ h₂
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
h₁ : x ∈ s
h₂ : ¬f x = 1
⊢ p x
state_after: no goals
Theorem: Nat.mem_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: rcases eq_or_ne m 0 with (rfl | hm)
state_before: n m : ℕ
⊢ n ∈ m.properDivisors ↔ n ∣ m ∧ n < m
state_after: case inl
n : ℕ
⊢ n ∈ properDivisors 0 ↔ n ∣ 0 ∧ n < 0

case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∈ m.properDivisors ↔ n ∣ m ∧ n < m

tactic: simp only [and_comm, ← filter_dvd_eq_properDivisors hm, mem_filter, mem_range]
state_before: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∈ m.properDivisors ↔ n ∣ m ∧ n < m
state_after: no goals

tactic: simp [properDivisors]
state_before: case inl
n : ℕ
⊢ n ∈ properDivisors 0 ↔ n ∣ 0 ∧ n < 0
state_after: no goals
Theorem: MeasureTheory.Measure.setLIntegral_rnDeriv
File: Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean

tactic: rw [← withDensity_apply' _ s, Measure.withDensity_rnDeriv_eq _ _ hμν]
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : μ.HaveLebesgueDecomposition ν
inst✝ : SFinite ν
hμν : μ ≪ ν
s : Set α
⊢ ∫⁻ (x : α) in s, μ.rnDeriv ν x ∂ν = μ s
state_after: no goals
Theorem: Option.map₂_right_comm
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> cases c <;> simp [h_right_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f✝ : α → β → γ
a : Option α
b : Option β
c : Option γ
α' : Type u_5
β' : Type u_6
δ' : Type u_7
ε : Type u_8
ε' : Type u_9
f : δ → γ → ε
g : α → β → δ
f' : α → γ → δ'
g' : δ' → β → ε
h_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b
⊢ map₂ f (map₂ g a b) c = map₂ g' (map₂ f' a c) b
state_after: no goals
Theorem: List.tails_eq_tailsTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

tactic: funext α
state_before: ⊢ @tails = @tailsTR
state_after: case h
α : Type u_1
⊢ tails = tailsTR

tactic: have H (l : List α) : ∀ acc, tailsTR.go l acc = acc.toList ++ tails l := by
  induction l <;> simp [*, tailsTR.go]
state_before: case h
α : Type u_1
⊢ tails = tailsTR
state_after: case h
α : Type u_1
H : ∀ (l : List α) (acc : Array (List α)), tailsTR.go l acc = acc.toList ++ l.tails
⊢ tails = tailsTR

tactic: simp (config := { unfoldPartialApp := true }) [tailsTR, H]
state_before: case h
α : Type u_1
H : ∀ (l : List α) (acc : Array (List α)), tailsTR.go l acc = acc.toList ++ l.tails
⊢ tails = tailsTR
state_after: no goals

tactic: induction l <;> simp [*, tailsTR.go]
state_before: α : Type u_1
l : List α
⊢ ∀ (acc : Array (List α)), tailsTR.go l acc = acc.toList ++ l.tails
state_after: no goals
Theorem: Int.clog_one_right
File: Mathlib/Data/Int/Log.lean

tactic: rw [clog_of_one_le_right _ le_rfl, Nat.ceil_one, Nat.clog_one_right, Int.ofNat_zero]
state_before: R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
⊢ clog b 1 = 0
state_after: no goals
Theorem: RatFunc.num_mul_denom_add_denom_mul_num_ne_zero
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: intro h_zero
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
⊢ x.num * y.denom + x.denom * y.num ≠ 0
state_after: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
⊢ False

tactic: have h := num_denom_add x y
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
⊢ False
state_after: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
h : (x + y).num * (x.denom * y.denom) = (x.num * y.denom + x.denom * y.num) * (x + y).denom
⊢ False

tactic: rw [h_zero, zero_mul] at h
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
h : (x + y).num * (x.denom * y.denom) = (x.num * y.denom + x.denom * y.num) * (x + y).denom
⊢ False
state_after: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
h : (x + y).num * (x.denom * y.denom) = 0
⊢ False

tactic: exact (mul_ne_zero (num_ne_zero hxy) (mul_ne_zero x.denom_ne_zero y.denom_ne_zero)) h
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
hxy : x + y ≠ 0
h_zero : x.num * y.denom + x.denom * y.num = 0
h : (x + y).num * (x.denom * y.denom) = 0
⊢ False
state_after: no goals
Theorem: Finset.card_sdiff_add_card_inter
File: Mathlib/Data/Finset/Card.lean

tactic: rw [← card_union_of_disjoint (disjoint_sdiff_inter _ _), sdiff_union_inter]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t✝ u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
s t : Finset α
⊢ (s \ t).card + (s ∩ t).card = s.card
state_after: no goals
Theorem: Ideal.comap_of_equiv
File: Mathlib/RingTheory/Ideal/Maps.lean

tactic: rw [← RingEquiv.toRingHom_eq_coe, ← RingEquiv.toRingHom_eq_coe, comap_comap,
  RingEquiv.toRingHom_eq_coe, RingEquiv.toRingHom_eq_coe, RingEquiv.symm_comp, comap_id]
state_before: R : Type u
S : Type v
F : Type u_1
inst✝³ : Semiring R
inst✝² : Semiring S
inst✝¹ : FunLike F R S
rc : RingHomClass F R S
f✝ : F
I✝ J : Ideal R
K L : Ideal S
G : Type u_2
inst✝ : FunLike G S R
rcg : RingHomClass G S R
ι : Sort u_3
I : Ideal R
f : R ≃+* S
⊢ comap (↑f) (comap (↑f.symm) I) = I
state_after: no goals
Theorem: Real.mk_add
File: Mathlib/Data/Real/Basic.lean

tactic: simp [mk, ← ofCauchy_add]
state_before: x y : ℝ
f g : CauSeq ℚ abs
⊢ mk (f + g) = mk f + mk g
state_after: no goals
Theorem: Equiv.Perm.cycleType_prime_order
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: refine ⟨Multiset.card σ.cycleType - 1, eq_replicate.2 ⟨?_, fun n hn ↦ ?_⟩⟩
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ ∃ n, σ.cycleType = Multiset.replicate (n + 1) (orderOf σ)
state_after: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ card σ.cycleType = card σ.cycleType - 1 + 1

case refine_2
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
n : ℕ
hn : n ∈ σ.cycleType
⊢ n = orderOf σ

tactic: rw [tsub_add_cancel_of_le]
state_before: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ card σ.cycleType = card σ.cycleType - 1 + 1
state_after: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ 1 ≤ card σ.cycleType

tactic: rw [Nat.succ_le_iff, card_cycleType_pos, Ne, ← orderOf_eq_one_iff]
state_before: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ 1 ≤ card σ.cycleType
state_after: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ ¬orderOf σ = 1

tactic: exact hσ.ne_one
state_before: case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
⊢ ¬orderOf σ = 1
state_after: no goals

tactic: exact (hσ.eq_one_or_self_of_dvd n (dvd_of_mem_cycleType hn)).resolve_left
  (one_lt_of_mem_cycleType hn).ne'
state_before: case refine_2
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : Nat.Prime (orderOf σ)
n : ℕ
hn : n ∈ σ.cycleType
⊢ n = orderOf σ
state_after: no goals
Theorem: one_div_ne_zero
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: simpa only [one_div] using inv_ne_zero h
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : a ≠ 0
⊢ 1 / a ≠ 0
state_after: no goals
Theorem: Matroid.Basis.exists_basis_inter_eq_of_superset
File: Mathlib/Data/Matroid/Basic.lean

tactic: obtain ⟨J, hJ, hIJ⟩ := hI.indep.subset_basis_of_subset (hI.subset.trans hXY)
state_before: α : Type u_1
M : Matroid α
I X Y : Set α
hI : M.Basis I X
hXY : X ⊆ Y
hY : autoParam (Y ⊆ M.E) _auto✝
⊢ ∃ J, M.Basis J Y ∧ J ∩ X = I
state_after: case intro.intro
α : Type u_1
M : Matroid α
I X Y : Set α
hI : M.Basis I X
hXY : X ⊆ Y
hY : autoParam (Y ⊆ M.E) _auto✝
J : Set α
hJ : M.Basis J Y
hIJ : I ⊆ J
⊢ ∃ J, M.Basis J Y ∧ J ∩ X = I

tactic: refine ⟨J, hJ, subset_antisymm ?_ (subset_inter hIJ hI.subset)⟩
state_before: case intro.intro
α : Type u_1
M : Matroid α
I X Y : Set α
hI : M.Basis I X
hXY : X ⊆ Y
hY : autoParam (Y ⊆ M.E) _auto✝
J : Set α
hJ : M.Basis J Y
hIJ : I ⊆ J
⊢ ∃ J, M.Basis J Y ∧ J ∩ X = I
state_after: case intro.intro
α : Type u_1
M : Matroid α
I X Y : Set α
hI : M.Basis I X
hXY : X ⊆ Y
hY : autoParam (Y ⊆ M.E) _auto✝
J : Set α
hJ : M.Basis J Y
hIJ : I ⊆ J
⊢ J ∩ X ⊆ I

tactic: exact fun e he ↦ hI.mem_of_insert_indep he.2 (hJ.indep.subset (insert_subset he.1 hIJ))
state_before: case intro.intro
α : Type u_1
M : Matroid α
I X Y : Set α
hI : M.Basis I X
hXY : X ⊆ Y
hY : autoParam (Y ⊆ M.E) _auto✝
J : Set α
hJ : M.Basis J Y
hIJ : I ⊆ J
⊢ J ∩ X ⊆ I
state_after: no goals
Theorem: Nat.card_fintypeIco
File: Mathlib/Order/Interval/Finset/Nat.lean

tactic: rw [Fintype.card_ofFinset, card_Ico]
state_before: a b c : ℕ
⊢ Fintype.card ↑(Set.Ico a b) = b - a
state_after: no goals
Theorem: Filter.HasBasis.blimsup_eq_iInf_iSup
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp only [blimsup_eq_limsup, (hf.inf_principal _).limsup_eq_iInf_iSup, mem_inter_iff, iSup_and,
  mem_setOf_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
p : ι → Prop
s : ι → Set β
f : Filter β
u : β → α
hf : f.HasBasis p s
q : β → Prop
⊢ blimsup u f q = ⨅ i, ⨅ (_ : p i), ⨆ a ∈ s i, ⨆ (_ : q a), u a
state_after: no goals
Theorem: Subgroup.commute_subtype_of_commute
File: Mathlib/GroupTheory/NoncommPiCoprod.lean

tactic: rintro ⟨x, hx⟩ ⟨y, hy⟩
state_before: G : Type u_1
inst✝ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Subgroup G
f g : (i : ι) → ↥(H i)
hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → Commute x y
i j : ι
hne : i ≠ j
⊢ ∀ (x : ↥(H i)) (y : ↥(H j)), Commute ((H i).subtype x) ((H j).subtype y)
state_after: case mk.mk
G : Type u_1
inst✝ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Subgroup G
f g : (i : ι) → ↥(H i)
hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → Commute x y
i j : ι
hne : i ≠ j
x : G
hx : x ∈ H i
y : G
hy : y ∈ H j
⊢ Commute ((H i).subtype ⟨x, hx⟩) ((H j).subtype ⟨y, hy⟩)

tactic: exact hcomm hne x y hx hy
state_before: case mk.mk
G : Type u_1
inst✝ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Subgroup G
f g : (i : ι) → ↥(H i)
hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → Commute x y
i j : ι
hne : i ≠ j
x : G
hx : x ∈ H i
y : G
hy : y ∈ H j
⊢ Commute ((H i).subtype ⟨x, hx⟩) ((H j).subtype ⟨y, hy⟩)
state_after: no goals
Theorem: mul_mem_ball_mul_iff
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp only [mem_ball, dist_eq_norm_div, mul_div_mul_right_eq_div]
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✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
c : E
⊢ a * c ∈ ball (b * c) r ↔ a ∈ ball b r
state_after: no goals