1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.setIntegral_indicator
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [integral_indicator ht, Measure.restrict_restrict ht, Set.inter_comm]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
ht : MeasurableSet t
⊢ ∫ (x : X) in s, t.indicator f x ∂μ = ∫ (x : X) in s ∩ t, f x ∂μ
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.Pullback.cocycle_fst_snd
File: Mathlib/AlgebraicGeometry/Pullbacks.lean

tactic: simp only [t'_fst_snd, t'_snd_snd, t'_fst_fst_fst]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : X.OpenCover
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (𝒰.map i ≫ f) g
i j k : 𝒰.J
⊢ t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.fst ≫ pullback.snd = pullback.fst ≫ pullback.snd
state_after: no goals
Theorem: Finset.mulEnergy_empty_left
File: Mathlib/Combinatorics/Additive/Energy.lean

tactic: simp [mulEnergy]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Mul α
s s₁ s₂ t t₁ t₂ : Finset α
⊢ Eₘ[∅, t] = 0
state_after: no goals
Theorem: EuclideanGeometry.collinear_of_sin_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: revert h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
h : sin (∠ p₁ p₂ p₃) = 0
⊢ Collinear ℝ {p₁, p₂, p₃}
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ sin (∠ p₁ p₂ p₃) = 0 → Collinear ℝ {p₁, p₂, p₃}

tactic: contrapose
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ sin (∠ p₁ p₂ p₃) = 0 → Collinear ℝ {p₁, p₂, p₃}
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ ¬Collinear ℝ {p₁, p₂, p₃} → ¬sin (∠ p₁ p₂ p₃) = 0

tactic: exact sin_ne_zero_of_not_collinear
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ ¬Collinear ℝ {p₁, p₂, p₃} → ¬sin (∠ p₁ p₂ p₃) = 0
state_after: no goals
Theorem: Finset.disjoint_coe
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [Finset.disjoint_left, Set.disjoint_left, mem_coe]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → β
s t u : Finset α
a b : α
⊢ _root_.Disjoint ↑s ↑t ↔ _root_.Disjoint s t
state_after: no goals
Theorem: Matroid.uniqueBaseOn_restrict'
File: Mathlib/Data/Matroid/Constructions.lean

tactic: simp_rw [eq_iff_indep_iff_indep_forall, restrict_ground_eq, uniqueBaseOn_ground, true_and,
  restrict_indep_iff, uniqueBaseOn_indep_iff', subset_inter_iff]
state_before: α : Type u_1
M : Matroid α
E✝ B I✝ X R✝ J I E R : Set α
⊢ uniqueBaseOn I E ↾ R = uniqueBaseOn (I ∩ R ∩ E) R
state_after: α : Type u_1
M : Matroid α
E✝ B I✝ X R✝ J I E R : Set α
⊢ ∀ I_1 ⊆ R, (I_1 ⊆ I ∧ I_1 ⊆ E) ∧ I_1 ⊆ R ↔ ((I_1 ⊆ I ∧ I_1 ⊆ R) ∧ I_1 ⊆ E) ∧ I_1 ⊆ R

tactic: tauto
state_before: α : Type u_1
M : Matroid α
E✝ B I✝ X R✝ J I E R : Set α
⊢ ∀ I_1 ⊆ R, (I_1 ⊆ I ∧ I_1 ⊆ E) ∧ I_1 ⊆ R ↔ ((I_1 ⊆ I ∧ I_1 ⊆ R) ∧ I_1 ⊆ E) ∧ I_1 ⊆ R
state_after: no goals
Theorem: VectorBundleCore.inCoordinates_eq
File: Mathlib/Topology/VectorBundle/Basic.lean

tactic: simp_rw [inCoordinates, Z'.trivializationAt_continuousLinearMapAt hy,
  Z.trivializationAt_symmL hx]
state_before: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝²² : NontriviallyNormedField R
inst✝²¹ : (x : B) → AddCommMonoid (E x)
inst✝²⁰ : (x : B) → Module R (E x)
inst✝¹⁹ : NormedAddCommGroup F
inst✝¹⁸ : NormedSpace R F
inst✝¹⁷ : TopologicalSpace B
inst✝¹⁶ : (x : B) → TopologicalSpace (E x)
𝕜₁ : Type u_5
𝕜₂ : Type u_6
inst✝¹⁵ : NontriviallyNormedField 𝕜₁
inst✝¹⁴ : NontriviallyNormedField 𝕜₂
σ : 𝕜₁ →+* 𝕜₂
B' : Type u_7
inst✝¹³ : TopologicalSpace B'
inst✝¹² : NormedSpace 𝕜₁ F
inst✝¹¹ : (x : B) → Module 𝕜₁ (E x)
inst✝¹⁰ : TopologicalSpace (TotalSpace F E)
F' : Type u_8
inst✝⁹ : NormedAddCommGroup F'
inst✝⁸ : NormedSpace 𝕜₂ F'
E' : B' → Type u_9
inst✝⁷ : (x : B') → AddCommMonoid (E' x)
inst✝⁶ : (x : B') → Module 𝕜₂ (E' x)
inst✝⁵ : TopologicalSpace (TotalSpace F' E')
inst✝⁴ : FiberBundle F E
inst✝³ : VectorBundle 𝕜₁ F E
inst✝² : (x : B') → TopologicalSpace (E' x)
inst✝¹ : FiberBundle F' E'
inst✝ : VectorBundle 𝕜₂ F' E'
ι : Type u_10
ι' : Type u_11
Z : VectorBundleCore 𝕜₁ B F ι
Z' : VectorBundleCore 𝕜₂ B' F' ι'
x₀ x : B
y₀ y : B'
ϕ : F →SL[σ] F'
hx : x ∈ Z.baseSet (Z.indexAt x₀)
hy : y ∈ Z'.baseSet (Z'.indexAt y₀)
⊢ inCoordinates F Z.Fiber F' Z'.Fiber x₀ x y₀ y ϕ =
    (Z'.coordChange (Z'.indexAt y) (Z'.indexAt y₀) y).comp (ϕ.comp (Z.coordChange (Z.indexAt x₀) (Z.indexAt x) x))
state_after: no goals
Theorem: Nat.Subtype.orderIsoOfNat_apply
File: Mathlib/Order/OrderIsoNat.lean

tactic: simp [orderIsoOfNat]
state_before: α : Type u_1
s : Set ℕ
inst✝ : Infinite ↑s
dP : DecidablePred fun x => x ∈ s
n : ℕ
⊢ (orderIsoOfNat s) n = ofNat s n
state_after: α : Type u_1
s : Set ℕ
inst✝ : Infinite ↑s
dP : DecidablePred fun x => x ∈ s
n : ℕ
⊢ ofNat s n = ofNat s n

tactic: congr!
state_before: α : Type u_1
s : Set ℕ
inst✝ : Infinite ↑s
dP : DecidablePred fun x => x ∈ s
n : ℕ
⊢ ofNat s n = ofNat s n
state_after: no goals
Theorem: CategoryTheory.ComposableArrows.Exact.δlast
File: Mathlib/Algebra/Homology/ExactSequence.lean

tactic: rw [exact_iff_δlast] at hS
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C (n + 2)
hS : S.Exact
⊢ S.δlast.Exact
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C (n + 2)
hS : S.δlast.Exact ∧ (mk₂ (S.map' n (n + 1) ⋯ ⋯) (S.map' (n + 1) (n + 2) ⋯ ⋯)).Exact
⊢ S.δlast.Exact

tactic: exact hS.1
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C (n + 2)
hS : S.δlast.Exact ∧ (mk₂ (S.map' n (n + 1) ⋯ ⋯) (S.map' (n + 1) (n + 2) ⋯ ⋯)).Exact
⊢ S.δlast.Exact
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.Point.toAffine_smul
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: by_cases hP : W.Nonsingular P
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
⊢ toAffine W (u • P) = toAffine W P
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
⊢ toAffine W (u • P) = toAffine W P

case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : ¬W.Nonsingular P
⊢ toAffine W (u • P) = toAffine W P

tactic: by_cases hPz : P z = 0
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
⊢ toAffine W (u • P) = toAffine W P
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : P z = 0
⊢ toAffine W (u • P) = toAffine W P

case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ toAffine W (u • P) = toAffine W P

tactic: rw [toAffine_of_Z_eq_zero <| mul_eq_zero_of_right u hPz, toAffine_of_Z_eq_zero hPz]
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : P z = 0
⊢ toAffine W (u • P) = toAffine W P
state_after: no goals

tactic: rw [toAffine_of_Z_ne_zero ((nonsingular_smul P hu).mpr hP) <| mul_ne_zero hu.ne_zero hPz,
  toAffine_of_Z_ne_zero hP hPz, Affine.Point.some.injEq]
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ toAffine W (u • P) = toAffine W P
state_after: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ (u • P) x / (u • P) z ^ 2 = P x / P z ^ 2 ∧ (u • P) y / (u • P) z ^ 3 = P y / P z ^ 3

tactic: simp only [smul_fin3_ext, mul_pow, mul_div_mul_left _ _ (hu.pow _).ne_zero, and_self]
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ (u • P) x / (u • P) z ^ 2 = P x / P z ^ 2 ∧ (u • P) y / (u • P) z ^ 3 = P y / P z ^ 3
state_after: no goals

tactic: rw [toAffine_of_singular <| hP.comp (nonsingular_smul P hu).mp, toAffine_of_singular hP]
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
u : F
hu : IsUnit u
hP : ¬W.Nonsingular P
⊢ toAffine W (u • P) = toAffine W P
state_after: no goals
Theorem: List.mem_attach
File: Mathlib/Data/List/Basic.lean

tactic: have := mem_map.1 (by rw [attach_map_val] <;> exact h)
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
a : α
h : a ∈ l
⊢ ⟨a, h⟩ ∈ l.attach
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
a : α
h : a ∈ l
this : ∃ a_1, a_1 ∈ l.attach ∧ ↑a_1 = a
⊢ ⟨a, h⟩ ∈ l.attach

tactic: rcases this with ⟨⟨_, _⟩, m, rfl⟩
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
a : α
h : a ∈ l
this : ∃ a_1, a_1 ∈ l.attach ∧ ↑a_1 = a
⊢ ⟨a, h⟩ ∈ l.attach
state_after: case intro.mk.intro
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
val✝ : α
property✝ : val✝ ∈ l
m : ⟨val✝, property✝⟩ ∈ l.attach
h : ↑⟨val✝, property✝⟩ ∈ l
⊢ ⟨↑⟨val✝, property✝⟩, h⟩ ∈ l.attach

tactic: exact m
state_before: case intro.mk.intro
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
val✝ : α
property✝ : val✝ ∈ l
m : ⟨val✝, property✝⟩ ∈ l.attach
h : ↑⟨val✝, property✝⟩ ∈ l
⊢ ⟨↑⟨val✝, property✝⟩, h⟩ ∈ l.attach
state_after: no goals

tactic: rw [attach_map_val] <;> exact h
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
a : α
h : a ∈ l
⊢ ?m.146901 ∈ map ?m.146902 ?m.146903
state_after: no goals
Theorem: List.forall₂_drop_append
File: Mathlib/Data/List/Forall2.lean

tactic: have h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂)) :=
  forall₂_drop (length l₁) h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
⊢ Forall₂ R (drop l₁.length l) l₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (drop l₁.length l) (drop l₁.length (l₁ ++ l₂))
⊢ Forall₂ R (drop l₁.length l) l₂

tactic: rwa [drop_left] at h'
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (drop l₁.length l) (drop l₁.length (l₁ ++ l₂))
⊢ Forall₂ R (drop l₁.length l) l₂
state_after: no goals
Theorem: Orientation.norm_div_sin_oangle_add_left_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at 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)
⊢ ‖x‖ / (o.oangle (x + y) y).sin = ‖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 y x = ↑(π / 2)
⊢ ‖x‖ / ((-o).oangle y (x + y)).sin = ‖x + y‖

tactic: rw [add_comm]
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 y x = ↑(π / 2)
⊢ ‖x‖ / ((-o).oangle y (x + y)).sin = ‖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 y x = ↑(π / 2)
⊢ ‖x‖ / ((-o).oangle y (y + x)).sin = ‖y + x‖

tactic: exact (-o).norm_div_sin_oangle_add_right_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 y x = ↑(π / 2)
⊢ ‖x‖ / ((-o).oangle y (y + x)).sin = ‖y + x‖
state_after: no goals
Theorem: Batteries.HashMap.Imp.Buckets.mk_size
File: .lake/packages/batteries/Batteries/Data/HashMap/WF.lean

tactic: simp only [mk, mkArray, size_eq]
state_before: α : Type u_1
β : Type u_2
n : Nat
h : 0 < n
⊢ (mk n h).size = 0
state_after: α : Type u_1
β : Type u_2
n : Nat
h : 0 < n
⊢ Nat.sum (List.map (fun x => x.toList.length) (List.replicate n AssocList.nil)) = 0

tactic: clear h
state_before: α : Type u_1
β : Type u_2
n : Nat
h : 0 < n
⊢ Nat.sum (List.map (fun x => x.toList.length) (List.replicate n AssocList.nil)) = 0
state_after: α : Type u_1
β : Type u_2
n : Nat
⊢ Nat.sum (List.map (fun x => x.toList.length) (List.replicate n AssocList.nil)) = 0

tactic: induction n <;> simp_all [List.replicate_succ]
state_before: α : Type u_1
β : Type u_2
n : Nat
⊢ Nat.sum (List.map (fun x => x.toList.length) (List.replicate n AssocList.nil)) = 0
state_after: no goals
Theorem: AdicCompletion.val_sum
File: Mathlib/RingTheory/AdicCompletion/Functoriality.lean

tactic: change (Submodule.subtype (AdicCompletion.submodule I M) _) n = _
state_before: R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
α : Type u_6
s : Finset α
f : α → AdicCompletion I M
n : ℕ
⊢ ↑(s.sum f) n = ∑ a ∈ s, ↑(f a) n
state_after: R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
α : Type u_6
s : Finset α
f : α → AdicCompletion I M
n : ℕ
⊢ (submodule I M).subtype (s.sum f) n = ∑ a ∈ s, ↑(f a) n

tactic: rw [map_sum, Finset.sum_apply, Submodule.coeSubtype]
state_before: R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
α : Type u_6
s : Finset α
f : α → AdicCompletion I M
n : ℕ
⊢ (submodule I M).subtype (s.sum f) n = ∑ a ∈ s, ↑(f a) n
state_after: no goals
Theorem: Nat.lt_mul_iff_one_lt_right
File: Mathlib/Data/Nat/Defs.lean

tactic: simpa using Nat.mul_lt_mul_left (b := 1) ha
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
ha : 0 < a
⊢ a < a * b ↔ 1 < b
state_after: no goals
Theorem: Finset.card_le_card_of_surjOn
File: Mathlib/Data/Finset/Card.lean

tactic: classical unfold Set.SurjOn at hf; exact (card_le_card (mod_cast hf)).trans card_image_le
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : Set.SurjOn f ↑s ↑t
⊢ t.card ≤ s.card
state_after: no goals

tactic: unfold Set.SurjOn at hf
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : Set.SurjOn f ↑s ↑t
⊢ t.card ≤ s.card
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : ↑t ⊆ f '' ↑s
⊢ t.card ≤ s.card

tactic: exact (card_le_card (mod_cast hf)).trans card_image_le
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : ↑t ⊆ f '' ↑s
⊢ t.card ≤ s.card
state_after: no goals
Theorem: tendsto_Ioo_atTop
File: Mathlib/Topology/Order/DenselyOrdered.lean

tactic: rw [← comap_coe_Ioo_nhdsWithin_Iio, tendsto_comap_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f✝ : α → β
f : β → ↑(Ioo a b)
⊢ Tendsto f l atTop ↔ Tendsto (fun x => ↑(f x)) l (𝓝[<] b)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f✝ : α → β
f : β → ↑(Ioo a b)
⊢ Tendsto (Subtype.val ∘ f) l (𝓝[<] b) ↔ Tendsto (fun x => ↑(f x)) l (𝓝[<] b)

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f✝ : α → β
f : β → ↑(Ioo a b)
⊢ Tendsto (Subtype.val ∘ f) l (𝓝[<] b) ↔ Tendsto (fun x => ↑(f x)) l (𝓝[<] b)
state_after: no goals
Theorem: Nat.mem_smoothNumbers_iff_forall_le
File: Mathlib/NumberTheory/SmoothNumbers.lean

tactic: simp only [smoothNumbers_eq_factoredNumbers, mem_factoredNumbers_iff_forall_le, Finset.mem_range]
state_before: n m : ℕ
⊢ m ∈ n.smoothNumbers ↔ m ≠ 0 ∧ ∀ p ≤ m, Prime p → p ∣ m → p < n
state_after: no goals
Theorem: Nat.gcdA_zero_left
File: Mathlib/Data/Int/GCD.lean

tactic: unfold gcdA
state_before: s : ℕ
⊢ gcdA 0 s = 0
state_after: s : ℕ
⊢ (xgcd 0 s).1 = 0

tactic: rw [xgcd, xgcd_zero_left]
state_before: s : ℕ
⊢ (xgcd 0 s).1 = 0
state_after: no goals
Theorem: Set.mulIndicator_comp_right
File: Mathlib/Algebra/Group/Indicator.lean

tactic: simp only [mulIndicator, Function.comp]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s✝ t : Set α
f✝ g✝ : α → M
a : α
s : Set α
f : β → α
g : α → M
x : β
⊢ (f ⁻¹' s).mulIndicator (g ∘ f) x = s.mulIndicator g (f x)
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s✝ t : Set α
f✝ g✝ : α → M
a : α
s : Set α
f : β → α
g : α → M
x : β
⊢ (if x ∈ f ⁻¹' s then g (f x) else 1) = if f x ∈ s then g (f x) else 1

tactic: split_ifs with h h' h'' <;> first | rfl | contradiction
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s✝ t : Set α
f✝ g✝ : α → M
a : α
s : Set α
f : β → α
g : α → M
x : β
⊢ (if x ∈ f ⁻¹' s then g (f x) else 1) = if f x ∈ s then g (f x) else 1
state_after: no goals

tactic: rfl
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s✝ t : Set α
f✝ g✝ : α → M
a : α
s : Set α
f : β → α
g : α → M
x : β
h : x ∉ f ⁻¹' s
h'' : f x ∉ s
⊢ 1 = 1
state_after: no goals

tactic: contradiction
state_before: case pos
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s✝ t : Set α
f✝ g✝ : α → M
a : α
s : Set α
f : β → α
g : α → M
x : β
h : x ∉ f ⁻¹' s
h'' : f x ∈ s
⊢ 1 = g (f x)
state_after: no goals
Theorem: Nat.modEq_nine_digits_sum
File: Mathlib/Data/Nat/Digits.lean

tactic: norm_num
state_before: n✝ n : ℕ
⊢ 10 % 9 = 1
state_after: no goals
Theorem: Polynomial.leadingCoeff_quadratic
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [add_assoc, add_comm, leadingCoeff_add_of_degree_lt <| degree_linear_lt_degree_C_mul_X_sq ha,
  leadingCoeff_C_mul_X_pow]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ (C a * X ^ 2 + C b * X + C c).leadingCoeff = a
state_after: no goals
Theorem: LinearMap.surjective_domRestrict_iff
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [← LinearMap.range_eq_top] at hf ⊢
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S✝ : Type u_7
inst✝⁸ : Semiring R
inst✝⁷ : Semiring R₂
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : M →ₛₗ[τ₁₂] M₂
S : Submodule R M
hf : Surjective ⇑f
⊢ Surjective ⇑(f.domRestrict S) ↔ S ⊔ LinearMap.ker f = ⊤
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S✝ : Type u_7
inst✝⁸ : Semiring R
inst✝⁷ : Semiring R₂
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : M →ₛₗ[τ₁₂] M₂
S : Submodule R M
hf : LinearMap.range f = ⊤
⊢ LinearMap.range (f.domRestrict S) = ⊤ ↔ S ⊔ LinearMap.ker f = ⊤

tactic: rw [← hf]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S✝ : Type u_7
inst✝⁸ : Semiring R
inst✝⁷ : Semiring R₂
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : M →ₛₗ[τ₁₂] M₂
S : Submodule R M
hf : LinearMap.range f = ⊤
⊢ LinearMap.range (f.domRestrict S) = ⊤ ↔ S ⊔ LinearMap.ker f = ⊤
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S✝ : Type u_7
inst✝⁸ : Semiring R
inst✝⁷ : Semiring R₂
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : M →ₛₗ[τ₁₂] M₂
S : Submodule R M
hf : LinearMap.range f = ⊤
⊢ LinearMap.range (f.domRestrict S) = LinearMap.range f ↔ S ⊔ LinearMap.ker f = ⊤

tactic: exact LinearMap.range_domRestrict_eq_range_iff
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S✝ : Type u_7
inst✝⁸ : Semiring R
inst✝⁷ : Semiring R₂
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : M →ₛₗ[τ₁₂] M₂
S : Submodule R M
hf : LinearMap.range f = ⊤
⊢ LinearMap.range (f.domRestrict S) = LinearMap.range f ↔ S ⊔ LinearMap.ker f = ⊤
state_after: no goals
Theorem: Set.toFinset_image2
File: Mathlib/Data/Finset/NAry.lean

tactic: simp
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝³ : DecidableEq γ
s✝ : Set α
t✝ : Set β
f : α → β → γ
s : Set α
t : Set β
inst✝² : Fintype ↑s
inst✝¹ : Fintype ↑t
inst✝ : Fintype ↑(image2 f s t)
⊢ ↑(image2 f s t).toFinset = ↑(image₂ f s.toFinset t.toFinset)
state_after: no goals
Theorem: Language.reverse_mul
File: Mathlib/Computability/Language.lean

tactic: simp only [mul_def, reverse_eq_image, image2_image_left, image2_image_right, image_image2,
  List.reverse_append]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
l✝ m✝ : Language α
a b x : List α
l m : Language α
⊢ (l * m).reverse = m.reverse * l.reverse
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
l✝ m✝ : Language α
a b x : List α
l m : Language α
⊢ image2 (fun a b => b.reverse ++ a.reverse) l m = image2 (fun a b => a.reverse ++ b.reverse) m l

tactic: apply image2_swap
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
l✝ m✝ : Language α
a b x : List α
l m : Language α
⊢ image2 (fun a b => b.reverse ++ a.reverse) l m = image2 (fun a b => a.reverse ++ b.reverse) m l
state_after: no goals