tasksource/leandojo huggingface dataset:
Theorem: Polynomial.degree_pos_of_root
File: Mathlib/Data/Polynomial/Degree/Lemmas.lean

tactic: have := eq_C_of_degree_le_zero hlt
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
h : IsRoot p a
hlt : 0 ≥ degree p
⊢ False

tactic: rw [IsRoot, this, eval_C] at h
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
h : IsRoot p a
hlt : 0 ≥ degree p
this : p = ↑C (coeff p 0)
⊢ False

tactic: simp only [h, RingHom.map_zero] at this
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
h : coeff p 0 = 0
hlt : 0 ≥ degree p
this : p = ↑C (coeff p 0)
⊢ False

tactic: exact hp this
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
h : coeff p 0 = 0
hlt : 0 ≥ degree p
this : p = 0
⊢ False
Theorem: IsLocalization.sec_spec'
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [mul_comm, sec_spec]
state_before: R : Type u_2
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_1
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.248906
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
z : S
⊢ ↑(algebraMap R S) (sec M z).fst = ↑(algebraMap R S) ↑(sec M z).snd * z
Theorem: IsLocalization.localization_localization_map_units
File: Mathlib/RingTheory/Localization/LocalizationLocalization.lean

tactic: obtain ⟨y', z, eq⟩ := mem_localizationLocalizationSubmodule.mp y.prop
state_before: R : Type u_3
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_1
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type ?u.58093
inst✝⁶ : CommRing P
N : Submonoid S
T : Type u_2
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : { x // x ∈ localizationLocalizationSubmodule M N }
⊢ IsUnit (↑(algebraMap R T) ↑y)

tactic: rw [IsScalarTower.algebraMap_apply R S T, eq, RingHom.map_mul, IsUnit.mul_iff]
state_before: case intro.intro
R : Type u_3
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_1
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type ?u.58093
inst✝⁶ : CommRing P
N : Submonoid S
T : Type u_2
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : { x // x ∈ localizationLocalizationSubmodule M N }
y' : { x // x ∈ N }
z : { x // x ∈ M }
eq : ↑(algebraMap R S) ↑y = ↑y' * ↑(algebraMap R S) ↑z
⊢ IsUnit (↑(algebraMap R T) ↑y)

tactic: exact ⟨IsLocalization.map_units T y', (IsLocalization.map_units _ z).map (algebraMap S T)⟩
state_before: case intro.intro
R : Type u_3
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_1
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type ?u.58093
inst✝⁶ : CommRing P
N : Submonoid S
T : Type u_2
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : { x // x ∈ localizationLocalizationSubmodule M N }
y' : { x // x ∈ N }
z : { x // x ∈ M }
eq : ↑(algebraMap R S) ↑y = ↑y' * ↑(algebraMap R S) ↑z
⊢ IsUnit (↑(algebraMap S T) ↑y') ∧ IsUnit (↑(algebraMap S T) (↑(algebraMap R S) ↑z))
Theorem: Cycle.next_reverse_eq_prev'
File: Mathlib/Data/List/Cycle.lean

tactic: simp [← prev_reverse_eq_next]
state_before: α : Type u_1
inst✝ : DecidableEq α
s : Cycle α
hs : Nodup (reverse s)
x : α
hx : x ∈ reverse s
⊢ next (reverse s) hs x hx = prev s (_ : Nodup s) x (_ : x ∈ s)
Theorem: CategoryTheory.Limits.Types.colimitEquivQuot_apply
File: Mathlib/CategoryTheory/Limits/Types.lean

tactic: apply (colimitEquivQuot F).symm.injective
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ TypeMax
j : J
x : F.obj j
⊢ ↑(colimitEquivQuot F) (colimit.ι F j x) = Quot.mk (Quot.Rel F) { fst := j, snd := x }

tactic: simp
state_before: case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ TypeMax
j : J
x : F.obj j
⊢ ↑(colimitEquivQuot F).symm (↑(colimitEquivQuot F) (colimit.ι F j x)) =
    ↑(colimitEquivQuot F).symm (Quot.mk (Quot.Rel F) { fst := j, snd := x })
Theorem: AlgebraicGeometry.PresheafedSpace.ext
File: Mathlib/AlgebraicGeometry/PresheafedSpace.lean

tactic: rw [w]
state_before: C : Type ?u.71852
inst✝ : Category C
X Y : PresheafedSpace C
α β : X ⟶ Y
w : α.base = β.base
⊢ Functor.op (Opens.map α.base) = Functor.op (Opens.map β.base)
Theorem: Submodule.prod_bot
File: Mathlib/LinearAlgebra/Span.lean

tactic: ext ⟨x, y⟩
state_before: R : Type u_3
R₂ : Type ?u.251481
K : Type ?u.251484
M : Type u_1
M₂ : Type ?u.251490
V : Type ?u.251493
S : Type ?u.251496
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
s t : Set M
M' : Type u_2
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
q₁ q₁' : Submodule R M'
⊢ prod ⊥ ⊥ = ⊥

tactic: simp [Prod.zero_eq_mk]
state_before: case h.mk
R : Type u_3
R₂ : Type ?u.251481
K : Type ?u.251484
M : Type u_1
M₂ : Type ?u.251490
V : Type ?u.251493
S : Type ?u.251496
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x✝ : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
s t : Set M
M' : Type u_2
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
q₁ q₁' : Submodule R M'
x : M
y : M'
⊢ (x, y) ∈ prod ⊥ ⊥ ↔ (x, y) ∈ ⊥
Theorem: Bool.not_eq_true
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> decide
state_before: b : Bool
⊢ (¬b = true) = (b = false)
Theorem: TopCat.Presheaf.presieveOfCovering.mem_grothendieckTopology
File: Mathlib/Topology/Sheaves/SheafCondition/Sites.lean

tactic: intro x hx
state_before: X : TopCat
ι : Type v
U : ι → Opens ↑X
⊢ Sieve.generate (presieveOfCovering U) ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) (iSup U)

tactic: obtain ⟨i, hxi⟩ := Opens.mem_iSup.mp hx
state_before: X : TopCat
ι : Type v
U : ι → Opens ↑X
x : ↑X
hx : x ∈ iSup U
⊢ ∃ U_1 f, (Sieve.generate (presieveOfCovering U)).arrows f ∧ x ∈ U_1

tactic: exact ⟨U i, Opens.leSupr U i, ⟨U i, 𝟙 _, Opens.leSupr U i, ⟨i, rfl⟩, Category.id_comp _⟩, hxi⟩
state_before: case intro
X : TopCat
ι : Type v
U : ι → Opens ↑X
x : ↑X
hx : x ∈ iSup U
i : ι
hxi : x ∈ U i
⊢ ∃ U_1 f, (Sieve.generate (presieveOfCovering U)).arrows f ∧ x ∈ U_1
Theorem: HasFDerivAtFilter.sub
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simpa only [sub_eq_add_neg] using hf.add hg.neg
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.446548
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.446643
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
hf : HasFDerivAtFilter f f' x L
hg : HasFDerivAtFilter g g' x L
⊢ HasFDerivAtFilter (fun x => f x - g x) (f' - g') x L
Theorem: uniqueDiffWithinAt_Iio
File: Mathlib/Analysis/Calculus/TangentCone.lean

tactic: simp
state_before: 𝕜 : Type ?u.188395
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type ?u.188401
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type ?u.188496
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.188586
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
x y : E
s t : Set E
a : ℝ
⊢ Set.Nonempty (interior (Iio a))

tactic: simp
state_before: 𝕜 : Type ?u.188395
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type ?u.188401
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type ?u.188496
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.188586
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
x y : E
s t : Set E
a : ℝ
⊢ a ∈ closure (Iio a)
Theorem: AList.lookupFinsupp_apply
File: Mathlib/Data/Finsupp/AList.lean

tactic: simp only [lookupFinsupp, ne_eq, Finsupp.coe_mk]
state_before: α : Type u_1
M : Type u_2
inst✝¹ : Zero M
inst✝ : DecidableEq α
l : AList fun _x => M
a : α
⊢ ↑(lookupFinsupp l) a = Option.getD (lookup a l) 0

tactic: congr
state_before: α : Type u_1
M : Type u_2
inst✝¹ : Zero M
inst✝ : DecidableEq α
l : AList fun _x => M
a : α
⊢ Option.getD (lookup a l) 0 = Option.getD (lookup a l) 0
Theorem: CategoryTheory.ProjectiveResolution.lift_commutes
File: Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean

tactic: ext
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroObject C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasEqualizers C
inst✝ : HasImages C
Y Z : C
f : Y ⟶ Z
P : ProjectiveResolution Y
Q : ProjectiveResolution Z
⊢ lift f P Q ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f

tactic: simp [lift, liftZero]
state_before: case h
C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroObject C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasEqualizers C
inst✝ : HasImages C
Y Z : C
f : Y ⟶ Z
P : ProjectiveResolution Y
Q : ProjectiveResolution Z
⊢ HomologicalComplex.Hom.f (lift f P Q ≫ Q.π) 0 = HomologicalComplex.Hom.f (P.π ≫ (ChainComplex.single₀ C).map f) 0
Theorem: Finset.nullMeasurableSet
File: Mathlib/MeasureTheory/Measure/NullMeasurable.lean

tactic: apply Finset.measurableSet
state_before: ι : Type ?u.22585
α : Type u_1
β : Type ?u.22591
γ : Type ?u.22594
m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝ : MeasurableSingletonClass (NullMeasurableSpace α)
s : Finset α
⊢ NullMeasurableSet ↑s
Theorem: Polynomial.natDegree_monomial_le
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [Polynomial.natDegree_monomial]
state_before: R : Type u
S : Type v
a✝ b c d : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
m : ℕ
⊢ natDegree (↑(monomial m) a) ≤ m

tactic: split_ifs
state_before: R : Type u
S : Type v
a✝ b c d : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
m : ℕ
⊢ (if a = 0 then 0 else m) ≤ m

tactic: exacts [Nat.zero_le _, rfl.le]
state_before: case inl
R : Type u
S : Type v
a✝ b c d : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
m : ℕ
h✝ : a = 0
⊢ 0 ≤ m

case inr
R : Type u
S : Type v
a✝ b c d : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
m : ℕ
h✝ : ¬a = 0
⊢ m ≤ m
Theorem: Set.Finite.toFinset_symmDiff
File: Mathlib/Data/Set/Finite.lean

tactic: ext
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs✝ : Set.Finite s
ht✝ : Set.Finite t
inst✝ : DecidableEq α
hs : Set.Finite s
ht : Set.Finite t
h : Set.Finite (s ∆ t)
⊢ Finite.toFinset h = Finite.toFinset hs ∆ Finite.toFinset ht

tactic: simp [mem_symmDiff, Finset.mem_symmDiff]
state_before: case a
α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs✝ : Set.Finite s
ht✝ : Set.Finite t
inst✝ : DecidableEq α
hs : Set.Finite s
ht : Set.Finite t
h : Set.Finite (s ∆ t)
a✝ : α
⊢ a✝ ∈ Finite.toFinset h ↔ a✝ ∈ Finite.toFinset hs ∆ Finite.toFinset ht
Theorem: MeasurableSet.univ
File: Mathlib/MeasureTheory/MeasurableSpaceDef.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.3526
γ : Type ?u.3529
δ : Type ?u.3532
δ' : Type ?u.3535
ι : Sort ?u.3538
s t u : Set α
m : MeasurableSpace α
⊢ MeasurableSet (univᶜ)
Theorem: induced_iff_nhds_eq
File: Mathlib/Topology/Order.lean

tactic: rw [h, nhds_induced]
state_before: α : Type u
β : Type v
γ : Type ?u.44785
f✝ : α → β
ι : Sort ?u.44792
tα : TopologicalSpace α
tβ : TopologicalSpace β
f : β → α
h : ∀ (b : β), 𝓝 b = comap f (𝓝 (f b))
x : β
⊢ 𝓝 x = 𝓝 x
Theorem: CategoryTheory.eqToHom_app
File: Mathlib/CategoryTheory/EqToHom.lean

tactic: subst h
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F G : C ⥤ D
h : F = G
X : C
⊢ (eqToHom h).app X = eqToHom (_ : F.obj X = G.obj X)

tactic: rfl
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X : C
⊢ (eqToHom (_ : F = F)).app X = eqToHom (_ : F.obj X = F.obj X)
Theorem: FiniteField.isSquare_iff
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: apply
  (iff_congr _ (by simp [Units.ext_iff])).mp (FiniteField.unit_isSquare_iff hF (Units.mk0 a ha))
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ IsSquare a ↔ a ^ (Fintype.card F / 2) = 1

tactic: simp only [IsSquare, Units.ext_iff, Units.val_mk0, Units.val_mul]
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ IsSquare (Units.mk0 a ha) ↔ IsSquare a

tactic: constructor
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ (∃ r, a = ↑r * ↑r) ↔ ∃ r, a = r * r

tactic: simp [Units.ext_iff]
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ Units.mk0 a ha ^ (Fintype.card F / 2) = 1 ↔ a ^ (Fintype.card F / 2) = 1

tactic: rintro ⟨y, hy⟩
state_before: case mp
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ (∃ r, a = ↑r * ↑r) → ∃ r, a = r * r

tactic: exact ⟨y, hy⟩
state_before: case mp.intro
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
y : Fˣ
hy : a = ↑y * ↑y
⊢ ∃ r, a = r * r

tactic: rintro ⟨y, rfl⟩
state_before: case mpr
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
a : F
ha : a ≠ 0
⊢ (∃ r, a = r * r) → ∃ r, a = ↑r * ↑r

tactic: have hy : y ≠ 0 := by rintro rfl; simp at ha
state_before: case mpr.intro
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
y : F
ha : y * y ≠ 0
⊢ ∃ r, y * y = ↑r * ↑r

tactic: refine' ⟨Units.mk0 y hy, _⟩
state_before: case mpr.intro
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
y : F
ha : y * y ≠ 0
hy : y ≠ 0
⊢ ∃ r, y * y = ↑r * ↑r

tactic: simp
state_before: case mpr.intro
K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
y : F
ha : y * y ≠ 0
hy : y ≠ 0
⊢ y * y = ↑(Units.mk0 y hy) * ↑(Units.mk0 y hy)

tactic: rintro rfl
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
y : F
ha : y * y ≠ 0
⊢ y ≠ 0

tactic: simp at ha
state_before: K : Type ?u.1283171
R : Type ?u.1283174
F : Type u_1
inst✝¹ : Field F
inst✝ : Fintype F
hF : ringChar F ≠ 2
ha : 0 * 0 ≠ 0
⊢ False
Theorem: starConvex_zero_iff
File: Mathlib/Analysis/Convex/Star.lean

tactic: refine'
  forall_congr' fun x => forall_congr' fun _ => ⟨fun h a ha₀ ha₁ => _, fun h a b ha hb hab => _⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
⊢ StarConvex 𝕜 0 s ↔ ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : 𝕜⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s

tactic: simpa only [sub_add_cancel, eq_self_iff_true, forall_true_left, zero_add, smul_zero] using
  h (sub_nonneg_of_le ha₁) ha₀
state_before: case refine'_1
𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
x : E
x✝ : x ∈ s
h : ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • 0 + b • x ∈ s
a : 𝕜
ha₀ : 0 ≤ a
ha₁ : a ≤ 1
⊢ a • x ∈ s

tactic: rw [smul_zero, zero_add]
state_before: case refine'_2
𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
x : E
x✝ : x ∈ s
h : ∀ ⦃a : 𝕜⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • 0 + b • x ∈ s

tactic: exact h hb (by rw [← hab]; exact le_add_of_nonneg_left ha)
state_before: case refine'_2
𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
x : E
x✝ : x ∈ s
h : ∀ ⦃a : 𝕜⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ b • x ∈ s

tactic: rw [← hab]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
x : E
x✝ : x ∈ s
h : ∀ ⦃a : 𝕜⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ b ≤ 1

tactic: exact le_add_of_nonneg_left ha
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.92819
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMulWithZero 𝕜 E
s : Set E
x : E
x✝ : x ∈ s
h : ∀ ⦃a : 𝕜⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ b ≤ a + b
Theorem: IsLocalization.lift_spec_mul_add
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: erw [mul_comm, ← mul_assoc, mul_add_inv_left hg, mul_comm]
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_3
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_2
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
g : R →+* P
hg : ∀ (y : { x // x ∈ M }), IsUnit (↑g ↑y)
z : S
w w' v : (fun x => P) z
⊢ ↑(Submonoid.LocalizationWithZeroMap.lift (toLocalizationWithZeroMap M S) (RingHom.toMonoidWithZeroHom g) hg) z * w +
        w' =
      v ↔
    ↑g (Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).fst * w +
        ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).snd * w' =
      ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).snd * v

tactic: rfl
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_3
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_2
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
g : R →+* P
hg : ∀ (y : { x // x ∈ M }), IsUnit (↑g ↑y)
z : S
w w' v : (fun x => P) z
⊢ ↑↑(RingHom.toMonoidWithZeroHom g)
            (Submonoid.LocalizationMap.sec (toLocalizationWithZeroMap M S).toLocalizationMap z).fst *
          w +
        ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationWithZeroMap M S).toLocalizationMap z).snd * w' =
      ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationWithZeroMap M S).toLocalizationMap z).snd * v ↔
    ↑g (Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).fst * w +
        ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).snd * w' =
      ↑g ↑(Submonoid.LocalizationMap.sec (toLocalizationMap M S) z).snd * v
Theorem: Finset.sup_sdiff_left
File: Mathlib/Data/Finset/Lattice.lean

tactic: refine' Finset.cons_induction_on s _ fun b t _ h => _
state_before: F : Type ?u.198274
α : Type u_2
β : Type ?u.198280
γ : Type ?u.198283
ι : Type u_1
κ : Type ?u.198289
inst✝ : BooleanAlgebra α
s✝ s : Finset ι
f : ι → α
a : α
⊢ (sup s fun b => a \ f b) = a \ inf s f

tactic: rw [sup_empty, inf_empty, sdiff_top]
state_before: case refine'_1
F : Type ?u.198274
α : Type u_2
β : Type ?u.198280
γ : Type ?u.198283
ι : Type u_1
κ : Type ?u.198289
inst✝ : BooleanAlgebra α
s✝ s : Finset ι
f : ι → α
a : α
⊢ (sup ∅ fun b => a \ f b) = a \ inf ∅ f

tactic: rw [sup_cons, inf_cons, h, sdiff_inf]
state_before: case refine'_2
F : Type ?u.198274
α : Type u_2
β : Type ?u.198280
γ : Type ?u.198283
ι : Type u_1
κ : Type ?u.198289
inst✝ : BooleanAlgebra α
s✝ s : Finset ι
f : ι → α
a : α
b : ι
t : Finset ι
x✝ : ¬b ∈ t
h : (sup t fun b => a \ f b) = a \ inf t f
⊢ (sup (cons b t x✝) fun b => a \ f b) = a \ inf (cons b t x✝) f
Theorem: BoxIntegral.Prepartition.iUnion_ofWithBot
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: suffices (⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J) = ⋃ J ∈ boxes, (J : Set (ι → ℝ)) by
  simpa [ofWithBot, Prepartition.iUnion]
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
boxes : Finset (WithBot (Box ι))
le_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I
pairwise_disjoint : Set.Pairwise (↑boxes) Disjoint
⊢ Prepartition.iUnion (ofWithBot boxes le_of_mem pairwise_disjoint) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J

tactic: simp only [← Box.biUnion_coe_eq_coe, @iUnion_comm _ _ (Box ι), @iUnion_comm _ _ (@Eq _ _ _),
  iUnion_iUnion_eq_right]
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
boxes : Finset (WithBot (Box ι))
le_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I
pairwise_disjoint : Set.Pairwise (↑boxes) Disjoint
⊢ (⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J

tactic: simpa [ofWithBot, Prepartition.iUnion]
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
boxes : Finset (WithBot (Box ι))
le_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I
pairwise_disjoint : Set.Pairwise (↑boxes) Disjoint
this : (⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J
⊢ Prepartition.iUnion (ofWithBot boxes le_of_mem pairwise_disjoint) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J
Theorem: Int.cast_natAbs
File: Mathlib/Data/Int/Cast/Lemmas.lean

tactic: cases n
state_before: F : Type ?u.33869
ι : Type ?u.33872
α : Type u_1
β : Type ?u.33878
inst✝ : LinearOrderedRing α
a b n : ℤ
⊢ ↑(natAbs n) = ↑(abs n)

tactic: simp
state_before: case ofNat
F : Type ?u.33869
ι : Type ?u.33872
α : Type u_1
β : Type ?u.33878
inst✝ : LinearOrderedRing α
a b : ℤ
a✝ : ℕ
⊢ ↑(natAbs (ofNat a✝)) = ↑(abs (ofNat a✝))

tactic: rw [abs_eq_natAbs, natAbs_negSucc, cast_succ, cast_ofNat, cast_succ]
state_before: case negSucc
F : Type ?u.33869
ι : Type ?u.33872
α : Type u_1
β : Type ?u.33878
inst✝ : LinearOrderedRing α
a b : ℤ
a✝ : ℕ
⊢ ↑(natAbs -[a✝+1]) = ↑(abs -[a✝+1])
Theorem: FreeAlgebra.liftAux_eq
File: Mathlib/Algebra/FreeAlgebra.lean

tactic: rw [lift]
state_before: R : Type u_1
inst✝² : CommSemiring R
X : Type u_2
A : Type u_3
inst✝¹ : Semiring A
inst✝ : Algebra R A
f : X → A
⊢ FreeAlgebra.liftAux R f = ↑(lift R) f

tactic: rfl
state_before: R : Type u_1
inst✝² : CommSemiring R
X : Type u_2
A : Type u_3
inst✝¹ : Semiring A
inst✝ : Algebra R A
f : X → A
⊢ FreeAlgebra.liftAux R f =
    ↑{ toFun := FreeAlgebra.liftAux R, invFun := fun F => ↑F ∘ ι R,
          left_inv := (_ : ∀ (f : X → A), (fun F => ↑F ∘ ι R) (FreeAlgebra.liftAux R f) = f),
          right_inv := (_ : ∀ (F : FreeAlgebra R X →ₐ[R] A), FreeAlgebra.liftAux R ((fun F => ↑F ∘ ι R) F) = F) }
      f
Theorem: Finset.fold_insert
File: Mathlib/Data/Finset/Fold.lean

tactic: unfold fold
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4116
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s)

tactic: rw [insert_val, ndinsert_of_not_mem h, Multiset.map_cons, fold_cons_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4116
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))
Theorem: InnerProductGeometry.angle_zero_right
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: unfold angle
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
⊢ angle x 0 = π / 2

tactic: rw [inner_zero_right, zero_div, Real.arccos_zero]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
⊢ arccos (inner x 0 / (‖x‖ * ‖0‖)) = π / 2