tasksource/leandojo huggingface dataset:
Theorem: Int.bodd_add_div2
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [show (cond (bodd n) 1 0 : ℤ) = (cond (bodd n) 1 0 : ℕ) by cases bodd n <;> rfl]
state_before: n : ℕ
⊢ (bif bodd ↑n then 1 else 0) + 2 * div2 ↑n = ↑n

tactic: exact congr_arg ofNat n.bodd_add_div2
state_before: n : ℕ
⊢ ↑(bif bodd ↑n then 1 else 0) + 2 * div2 ↑n = ↑n

tactic: cases bodd n <;> rfl
state_before: n : ℕ
⊢ (bif bodd ↑n then 1 else 0) = ↑(bif bodd ↑n then 1 else 0)

tactic: refine' Eq.trans _ (congr_arg negSucc n.bodd_add_div2)
state_before: n : ℕ
⊢ (bif bodd -[n+1] then 1 else 0) + 2 * div2 -[n+1] = -[n+1]

tactic: dsimp [bodd]
state_before: n : ℕ
⊢ (bif bodd -[n+1] then 1 else 0) + 2 * div2 -[n+1] = -[(bif Nat.bodd n then 1 else 0) + 2 * Nat.div2 n+1]

tactic: cases Nat.bodd n <;> dsimp [cond, not, div2, Int.mul]
state_before: n : ℕ
⊢ (bif !Nat.bodd n then 1 else 0) + 2 * div2 -[n+1] = -[(bif Nat.bodd n then 1 else 0) + 2 * Nat.div2 n+1]

tactic: change -[2 * Nat.div2 n+1] = _
state_before: case false
n : ℕ
⊢ 1 + 2 * -[Nat.div2 n+1] = -[0 + 2 * Nat.div2 n+1]

tactic: rw [zero_add]
state_before: case false
n : ℕ
⊢ -[2 * Nat.div2 n+1] = -[0 + 2 * Nat.div2 n+1]

tactic: rw [zero_add, add_comm]
state_before: case true
n : ℕ
⊢ 0 + 2 * -[Nat.div2 n+1] = -[1 + 2 * Nat.div2 n+1]

tactic: rfl
state_before: case true
n : ℕ
⊢ 2 * -[Nat.div2 n+1] = -[2 * Nat.div2 n + 1+1]
Theorem: MeasureTheory.SignedMeasure.findExistsOneDivLT_spec
File: Mathlib/MeasureTheory/Decomposition/SignedHahn.lean

tactic: rw [findExistsOneDivLT, dif_pos hi]
state_before: α : Type u_1
β : Type ?u.2701
inst✝³ : MeasurableSpace α
M : Type ?u.2707
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)

tactic: convert Nat.find_spec (existsNatOneDivLTMeasure_of_not_negative hi)
state_before: α : Type u_1
β : Type ?u.2701
inst✝³ : MeasurableSpace α
M : Type ?u.2707
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (Nat.find (_ : ∃ n, MeasureTheory.SignedMeasure.ExistsOneDivLT s i n))
Theorem: WithZeroTopology.tendsto_of_ne_zero
File: Mathlib/Topology/Algebra/WithZeroTopology.lean

tactic: rw [nhds_of_ne_zero h, tendsto_pure]
state_before: α : Type u_2
Γ₀ : Type u_1
inst✝ : LinearOrderedCommGroupWithZero Γ₀
γ✝ γ₁ γ₂ : Γ₀
l : Filter α
f : α → Γ₀
γ : Γ₀
h : γ ≠ 0
⊢ Tendsto f l (𝓝 γ) ↔ ∀ᶠ (x : α) in l, f x = γ
Theorem: Filter.isCompl_principal
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [inf_principal, inter_compl_self, principal_empty]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.117337
ι : Sort x
f g : Filter α
s✝ t s : Set α
⊢ 𝓟 s ⊓ 𝓟 (sᶜ) = ⊥

tactic: rw [sup_principal, union_compl_self, principal_univ]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.117337
ι : Sort x
f g : Filter α
s✝ t s : Set α
⊢ 𝓟 s ⊔ 𝓟 (sᶜ) = ⊤
Theorem: InnerProductGeometry.sin_angle_sub_mul_norm_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
⊢ Real.sin (angle x (x - y)) * ‖x - y‖ = ‖y‖

tactic: rw [sub_eq_add_neg, sin_angle_add_mul_norm_of_inner_eq_zero h, norm_neg]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x (-y) = 0
⊢ Real.sin (angle x (x - y)) * ‖x - y‖ = ‖y‖
Theorem: Ultrafilter.eq_pure_of_finite_mem
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: rw [← biUnion_of_singleton s] at h'
state_before: α : Type u
β : Type v
γ : Type ?u.21406
f g : Ultrafilter α
s t : Set α
p q : α → Prop
h : Set.Finite s
h' : s ∈ f
⊢ ∃ x, x ∈ s ∧ f = pure x

tactic: rcases(Ultrafilter.finite_biUnion_mem_iff h).mp h' with ⟨a, has, haf⟩
state_before: α : Type u
β : Type v
γ : Type ?u.21406
f g : Ultrafilter α
s t : Set α
p q : α → Prop
h : Set.Finite s
h' : (⋃ (x : α) (_ : x ∈ s), {x}) ∈ f
⊢ ∃ x, x ∈ s ∧ f = pure x

tactic: exact ⟨a, has, eq_of_le (Filter.le_pure_iff.2 haf)⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type ?u.21406
f g : Ultrafilter α
s t : Set α
p q : α → Prop
h : Set.Finite s
h' : (⋃ (x : α) (_ : x ∈ s), {x}) ∈ f
a : α
has : a ∈ s
haf : {a} ∈ f
⊢ ∃ x, x ∈ s ∧ f = pure x
Theorem: RingQuot.mkRingHom_surjective
File: Mathlib/Algebra/RingQuot.lean

tactic: simp [mkRingHom_def]
state_before: R : Type u₁
inst✝³ : Semiring R
S : Type u₂
inst✝² : CommSemiring S
A : Type u₃
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
⊢ Function.Surjective ↑(mkRingHom r)

tactic: rintro ⟨⟨⟩⟩
state_before: R : Type u₁
inst✝³ : Semiring R
S : Type u₂
inst✝² : CommSemiring S
A : Type u₃
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
⊢ Function.Surjective fun x => { toQuot := Quot.mk (Rel r) x }

tactic: simp
state_before: case mk.mk
R : Type u₁
inst✝³ : Semiring R
S : Type u₂
inst✝² : CommSemiring S
A : Type u₃
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
toQuot✝ : Quot (Rel r)
a✝ : R
⊢ ∃ a, (fun x => { toQuot := Quot.mk (Rel r) x }) a = { toQuot := Quot.mk (Rel r) a✝ }
Theorem: isOpen_setOf_nat_le_rank
File: Mathlib/Analysis/NormedSpace/FiniteDimension.lean

tactic: simp only [LinearMap.le_rank_iff_exists_linearIndependent_finset, setOf_exists, ← exists_prop]
state_before: 𝕜 : Type u
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type v
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type w
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
F' : Type x
inst✝⁵ : AddCommGroup F'
inst✝⁴ : Module 𝕜 F'
inst✝³ : TopologicalSpace F'
inst✝² : TopologicalAddGroup F'
inst✝¹ : ContinuousSMul 𝕜 F'
inst✝ : CompleteSpace 𝕜
n : ℕ
⊢ IsOpen {f | ↑n ≤ LinearMap.rank ↑f}

tactic: refine' isOpen_biUnion fun t _ => _
state_before: 𝕜 : Type u
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type v
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type w
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
F' : Type x
inst✝⁵ : AddCommGroup F'
inst✝⁴ : Module 𝕜 F'
inst✝³ : TopologicalSpace F'
inst✝² : TopologicalAddGroup F'
inst✝¹ : ContinuousSMul 𝕜 F'
inst✝ : CompleteSpace 𝕜
n : ℕ
⊢ IsOpen (⋃ (i : Finset E) (_ : Finset.card i = n), {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1})

tactic: have : Continuous fun f : E →L[𝕜] F => fun x : (t : Set E) => f x :=
  continuous_pi fun x => (ContinuousLinearMap.apply 𝕜 F (x : E)).continuous
state_before: 𝕜 : Type u
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type v
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type w
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
F' : Type x
inst✝⁵ : AddCommGroup F'
inst✝⁴ : Module 𝕜 F'
inst✝³ : TopologicalSpace F'
inst✝² : TopologicalAddGroup F'
inst✝¹ : ContinuousSMul 𝕜 F'
inst✝ : CompleteSpace 𝕜
n : ℕ
t : Finset E
x✝ : t ∈ fun i => Finset.card i = n
⊢ IsOpen {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1}

tactic: exact isOpen_setOf_linearIndependent.preimage this
state_before: 𝕜 : Type u
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type v
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type w
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
F' : Type x
inst✝⁵ : AddCommGroup F'
inst✝⁴ : Module 𝕜 F'
inst✝³ : TopologicalSpace F'
inst✝² : TopologicalAddGroup F'
inst✝¹ : ContinuousSMul 𝕜 F'
inst✝ : CompleteSpace 𝕜
n : ℕ
t : Finset E
x✝ : t ∈ fun i => Finset.card i = n
this : Continuous fun f x => ↑f ↑x
⊢ IsOpen {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1}
Theorem: FiniteDimensional.Subalgebra.isSimpleOrder_of_finrank_prime
File: Mathlib/FieldTheory/Tower.lean

tactic: haveI : FiniteDimensional _ _ := finiteDimensional_of_finrank hp.pos
state_before: F : Type u
K✝ : Type v
A✝ : Type w
inst✝⁹ : Field F
inst✝⁸ : DivisionRing K✝
inst✝⁷ : AddCommGroup A✝
inst✝⁶ : Algebra F K✝
inst✝⁵ : Module K✝ A✝
inst✝⁴ : Module F A✝
inst✝³ : IsScalarTower F K✝ A✝
A : Type u_1
inst✝² : Ring A
inst✝¹ : IsDomain A
inst✝ : Algebra F A
hp : Nat.Prime (finrank F A)
K : Subalgebra F A
⊢ K = ⊥ ∨ K = ⊤

tactic: letI := divisionRingOfFiniteDimensional F K
state_before: F : Type u
K✝ : Type v
A✝ : Type w
inst✝⁹ : Field F
inst✝⁸ : DivisionRing K✝
inst✝⁷ : AddCommGroup A✝
inst✝⁶ : Algebra F K✝
inst✝⁵ : Module K✝ A✝
inst✝⁴ : Module F A✝
inst✝³ : IsScalarTower F K✝ A✝
A : Type u_1
inst✝² : Ring A
inst✝¹ : IsDomain A
inst✝ : Algebra F A
hp : Nat.Prime (finrank F A)
K : Subalgebra F A
this : FiniteDimensional F A
⊢ K = ⊥ ∨ K = ⊤

tactic: refine' (hp.eq_one_or_self_of_dvd _ ⟨_, (finrank_mul_finrank F K A).symm⟩).imp _ fun h => _
state_before: F : Type u
K✝ : Type v
A✝ : Type w
inst✝⁹ : Field F
inst✝⁸ : DivisionRing K✝
inst✝⁷ : AddCommGroup A✝
inst✝⁶ : Algebra F K✝
inst✝⁵ : Module K✝ A✝
inst✝⁴ : Module F A✝
inst✝³ : IsScalarTower F K✝ A✝
A : Type u_1
inst✝² : Ring A
inst✝¹ : IsDomain A
inst✝ : Algebra F A
hp : Nat.Prime (finrank F A)
K : Subalgebra F A
this✝ : FiniteDimensional F A
this : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }
⊢ K = ⊥ ∨ K = ⊤

tactic: exact Subalgebra.eq_bot_of_finrank_one
state_before: case refine'_1
F : Type u
K✝ : Type v
A✝ : Type w
inst✝⁹ : Field F
inst✝⁸ : DivisionRing K✝
inst✝⁷ : AddCommGroup A✝
inst✝⁶ : Algebra F K✝
inst✝⁵ : Module K✝ A✝
inst✝⁴ : Module F A✝
inst✝³ : IsScalarTower F K✝ A✝
A : Type u_1
inst✝² : Ring A
inst✝¹ : IsDomain A
inst✝ : Algebra F A
hp : Nat.Prime (finrank F A)
K : Subalgebra F A
this✝ : FiniteDimensional F A
this : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }
⊢ finrank F { x // x ∈ K } = 1 → K = ⊥

tactic: exact
  Algebra.toSubmodule_eq_top.1 (eq_top_of_finrank_eq <| K.finrank_toSubmodule.trans h)
state_before: case refine'_2
F : Type u
K✝ : Type v
A✝ : Type w
inst✝⁹ : Field F
inst✝⁸ : DivisionRing K✝
inst✝⁷ : AddCommGroup A✝
inst✝⁶ : Algebra F K✝
inst✝⁵ : Module K✝ A✝
inst✝⁴ : Module F A✝
inst✝³ : IsScalarTower F K✝ A✝
A : Type u_1
inst✝² : Ring A
inst✝¹ : IsDomain A
inst✝ : Algebra F A
hp : Nat.Prime (finrank F A)
K : Subalgebra F A
this✝ : FiniteDimensional F A
this : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }
h : finrank F { x // x ∈ K } = finrank F A
⊢ K = ⊤
Theorem: Submodule.sup_orthogonal_of_completeSpace
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: convert Submodule.sup_orthogonal_inf_of_completeSpace (le_top : K ≤ ⊤) using 2
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.764822
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K }
⊢ K ⊔ Kᗮ = ⊤

tactic: simp
state_before: case h.e'_2.h.e'_4
𝕜 : Type u_2
E : Type u_1
F : Type ?u.764822
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K }
⊢ Kᗮ = Kᗮ ⊓ ⊤
Theorem: EuclideanGeometry.cospherical_iff_exists_sphere
File: Mathlib/Geometry/Euclidean/Sphere/Basic.lean

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: V : Type ?u.6464
P : Type u_1
inst✝ : MetricSpace P
ps : Set P
⊢ Cospherical ps ↔ ∃ s, ps ⊆ Metric.sphere s.center s.radius

tactic: rcases h with ⟨c, r, h⟩
state_before: case refine'_1
V : Type ?u.6464
P : Type u_1
inst✝ : MetricSpace P
ps : Set P
h : Cospherical ps
⊢ ∃ s, ps ⊆ Metric.sphere s.center s.radius

tactic: exact ⟨⟨c, r⟩, h⟩
state_before: case refine'_1.intro.intro
V : Type ?u.6464
P : Type u_1
inst✝ : MetricSpace P
ps : Set P
c : P
r : ℝ
h : ∀ (p : P), p ∈ ps → dist p c = r
⊢ ∃ s, ps ⊆ Metric.sphere s.center s.radius

tactic: rcases h with ⟨s, h⟩
state_before: case refine'_2
V : Type ?u.6464
P : Type u_1
inst✝ : MetricSpace P
ps : Set P
h : ∃ s, ps ⊆ Metric.sphere s.center s.radius
⊢ Cospherical ps

tactic: exact ⟨s.center, s.radius, h⟩
state_before: case refine'_2.intro
V : Type ?u.6464
P : Type u_1
inst✝ : MetricSpace P
ps : Set P
s : Sphere P
h : ps ⊆ Metric.sphere s.center s.radius
⊢ Cospherical ps
Theorem: Finsupp.supported_iInter
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: simp [mem_supported, subset_iInter_iff]
state_before: α : Type u_2
M : Type u_3
N : Type ?u.111089
P : Type ?u.111092
R : Type u_4
S : Type ?u.111098
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
ι : Type u_1
s : ι → Set α
x : α →₀ M
⊢ x ∈ supported M R (⋂ (i : ι), s i) ↔ x ∈ ⨅ (i : ι), supported M R (s i)
Theorem: Set.range_ite_subset'
File: Mathlib/Data/Set/Image.lean

tactic: by_cases h : p
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.93171
ι : Sort ?u.93174
ι' : Sort ?u.93177
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
⊢ range (if p then f else g) ⊆ range f ∪ range g

tactic: rw [if_pos h]
state_before: case pos
α : Type u_2
β : Type u_1
γ : Type ?u.93171
ι : Sort ?u.93174
ι' : Sort ?u.93177
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : p
⊢ range (if p then f else g) ⊆ range f ∪ range g

tactic: exact subset_union_left _ _
state_before: case pos
α : Type u_2
β : Type u_1
γ : Type ?u.93171
ι : Sort ?u.93174
ι' : Sort ?u.93177
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : p
⊢ range f ⊆ range f ∪ range g

tactic: rw [if_neg h]
state_before: case neg
α : Type u_2
β : Type u_1
γ : Type ?u.93171
ι : Sort ?u.93174
ι' : Sort ?u.93177
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : ¬p
⊢ range (if p then f else g) ⊆ range f ∪ range g

tactic: exact subset_union_right _ _
state_before: case neg
α : Type u_2
β : Type u_1
γ : Type ?u.93171
ι : Sort ?u.93174
ι' : Sort ?u.93177
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : ¬p
⊢ range g ⊆ range f ∪ range g
Theorem: Real.sqrt_mul_self_eq_abs
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [← abs_mul_abs_self x, sqrt_mul_self (abs_nonneg _)]
state_before: x✝ y x : ℝ
⊢ sqrt (x * x) = abs x
Theorem: Polynomial.rootSet_monomial
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: rw [rootSet, map_monomial, roots_monomial ((_root_.map_ne_zero (algebraMap R S)).2 ha),
  Multiset.toFinset_nsmul _ _ hn, Multiset.toFinset_singleton, Finset.coe_singleton]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a✝ b : R
n✝ : ℕ
inst✝³ : Field R
p q : R[X]
inst✝² : CommRing S
inst✝¹ : IsDomain S
inst✝ : Algebra R S
n : ℕ
hn : n ≠ 0
a : R
ha : a ≠ 0
⊢ rootSet (↑(monomial n) a) S = {0}
Theorem: Set.div_mem_center₀
File: Mathlib/GroupTheory/Subsemigroup/Center.lean

tactic: rw [div_eq_mul_inv]
state_before: M : Type u_1
inst✝ : GroupWithZero M
a b : M
ha : a ∈ center M
hb : b ∈ center M
⊢ a / b ∈ center M

tactic: exact mul_mem_center ha (inv_mem_center₀ hb)
state_before: M : Type u_1
inst✝ : GroupWithZero M
a b : M
ha : a ∈ center M
hb : b ∈ center M
⊢ a * b⁻¹ ∈ center M
Theorem: Nat.even_xor_odd'
File: Mathlib/Data/Nat/Parity.lean

tactic: rcases even_or_odd n with (⟨k, rfl⟩ | ⟨k, rfl⟩) <;> use k
state_before: m n✝ n : ℕ
⊢ ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)

tactic: simpa only [← two_mul, eq_self_iff_true, xor_true] using (succ_ne_self (2 * k)).symm
state_before: case inl.intro
m n k : ℕ
⊢ Xor' (k + k = 2 * k) (k + k = 2 * k + 1)

tactic: simpa only [xor_true, xor_comm] using (succ_ne_self _)
state_before: case inr.intro
m n k : ℕ
⊢ Xor' (2 * k + 1 = 2 * k) (2 * k + 1 = 2 * k + 1)
Theorem: Set.MapsTo.restrict_inj
File: Mathlib/Data/Set/Function.lean

tactic: rw [h.restrict_eq_codRestrict, injective_codRestrict, injOn_iff_injective]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.34549
ι : Sort ?u.34552
π : α → Type ?u.34557
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
h : MapsTo f s t
⊢ Injective (restrict f s t h) ↔ InjOn f s
Theorem: Polynomial.natDegree_X_pow_add_C
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: by_cases hn : n = 0
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Nontrivial R
inst✝ : Semiring R
n : ℕ
r : R
⊢ natDegree (X ^ n + ↑C r) = n

tactic: rw [hn, pow_zero, ← C_1, ← RingHom.map_add, natDegree_C]
state_before: case pos
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Nontrivial R
inst✝ : Semiring R
n : ℕ
r : R
hn : n = 0
⊢ natDegree (X ^ n + ↑C r) = n

tactic: exact natDegree_eq_of_degree_eq_some (degree_X_pow_add_C (pos_iff_ne_zero.mpr hn) r)
state_before: case neg
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Nontrivial R
inst✝ : Semiring R
n : ℕ
r : R
hn : ¬n = 0
⊢ natDegree (X ^ n + ↑C r) = n
Theorem: Nat.mul_pred_left
File: src/lean/Init/Data/Nat/Basic.lean

tactic: cases n with
| zero   => simp
| succ n => rw [Nat.pred_succ, succ_mul, Nat.add_sub_cancel]
state_before: n m : Nat
⊢ pred n * m = n * m - m

tactic: simp
state_before: case zero
m : Nat
⊢ pred zero * m = zero * m - m

tactic: rw [Nat.pred_succ, succ_mul, Nat.add_sub_cancel]
state_before: case succ
m n : Nat
⊢ pred (succ n) * m = succ n * m - m
Theorem: Nat.ArithmeticFunction.pmul_comm
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: ext
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
f g : ArithmeticFunction R
⊢ pmul f g = pmul g f

tactic: simp [mul_comm]
state_before: case h
R : Type u_1
inst✝ : CommMonoidWithZero R
f g : ArithmeticFunction R
x✝ : ℕ
⊢ ↑(pmul f g) x✝ = ↑(pmul g f) x✝
Theorem: Subring.mem_iInf
File: Mathlib/RingTheory/Subring/Basic.lean

tactic: simp only [iInf, mem_sInf, Set.forall_range_iff]
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
S : ι → Subring R
x : R
⊢ (x ∈ ⨅ (i : ι), S i) ↔ ∀ (i : ι), x ∈ S i
Theorem: PowerSeries.coeff_C
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [← monomial_zero_eq_C_apply, coeff_monomial]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
a : R
⊢ ↑(coeff R n) (↑(C R) a) = if n = 0 then a else 0
Theorem: CategoryTheory.Limits.hasLimitOfEquivalenceComp
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: haveI : HasLimit (e.inverse ⋙ e.functor ⋙ F) := Limits.hasLimitEquivalenceComp e.symm
state_before: J : Type u₁
inst✝³ : Category J
K : Type u₂
inst✝² : Category K
C : Type u
inst✝¹ : Category C
F : J ⥤ C
e : K ≌ J
inst✝ : HasLimit (e.functor ⋙ F)
⊢ HasLimit F

tactic: apply hasLimitOfIso (e.invFunIdAssoc F)
state_before: J : Type u₁
inst✝³ : Category J
K : Type u₂
inst✝² : Category K
C : Type u
inst✝¹ : Category C
F : J ⥤ C
e : K ≌ J
inst✝ : HasLimit (e.functor ⋙ F)
this : HasLimit (e.inverse ⋙ e.functor ⋙ F)
⊢ HasLimit F
Theorem: ConvexOn.comp_linearMap
File: Mathlib/Analysis/Convex/Function.lean

tactic: rw [g.map_add, g.map_smul, g.map_smul]
state_before: 𝕜 : Type u_2
E : Type u_4
F : Type u_1
α : Type ?u.262486
β : Type u_3
ι : Type ?u.262492
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : SMul 𝕜 β
f : F → β
s : Set F
hf : ConvexOn 𝕜 s f
g : E →ₗ[𝕜] F
x : E
hx : x ∈ ↑g ⁻¹' s
y : E
hy : y ∈ ↑g ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ f (↑g (a • x + b • y)) = f (a • ↑g x + b • ↑g y)
Theorem: bddAbove_empty
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp only [BddAbove, upperBounds_empty, univ_nonempty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s t : Set α
a b : α
inst✝ : Nonempty α
⊢ BddAbove ∅
Theorem: YoungDiagram.ofRowLens_to_rowLens_eq_self
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: ext ⟨i, j⟩
state_before: μ : YoungDiagram
⊢ ofRowLens (rowLens μ) (_ : List.Sorted (fun x x_1 => x ≥ x_1) (rowLens μ)) = μ

tactic: simp only [mem_cells, mem_ofRowLens, length_rowLens, get_rowLens]
state_before: case cells.a.mk
μ : YoungDiagram
i j : ℕ
⊢ (i, j) ∈ (ofRowLens (rowLens μ) (_ : List.Sorted (fun x x_1 => x ≥ x_1) (rowLens μ))).cells ↔ (i, j) ∈ μ.cells

tactic: simpa [← mem_iff_lt_colLen, mem_iff_lt_rowLen] using j.zero_le.trans_lt
state_before: case cells.a.mk
μ : YoungDiagram
i j : ℕ
⊢ (∃ h, j < rowLen μ i) ↔ (i, j) ∈ μ
Theorem: MeasureTheory.ae_restrict_iff'
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp only [ae_iff, ← compl_setOf, restrict_apply_eq_zero' hs]
state_before: α : Type u_1
β : Type ?u.572648
γ : Type ?u.572651
δ : Type ?u.572654
ι : Type ?u.572657
R : Type ?u.572660
R' : Type ?u.572663
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
p : α → Prop
hs : MeasurableSet s
⊢ (∀ᵐ (x : α) ∂Measure.restrict μ s, p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ s → p x

tactic: rw [iff_iff_eq]
state_before: α : Type u_1
β : Type ?u.572648
γ : Type ?u.572651
δ : Type ?u.572654
ι : Type ?u.572657
R : Type ?u.572660
R' : Type ?u.572663
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
p : α → Prop
hs : MeasurableSet s
⊢ ↑↑μ ({x | p x}ᶜ ∩ s) = 0 ↔ ↑↑μ ({x | x ∈ s → p x}ᶜ) = 0

tactic: congr with x
state_before: α : Type u_1
β : Type ?u.572648
γ : Type ?u.572651
δ : Type ?u.572654
ι : Type ?u.572657
R : Type ?u.572660
R' : Type ?u.572663
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
p : α → Prop
hs : MeasurableSet s
⊢ (↑↑μ ({x | p x}ᶜ ∩ s) = 0) = (↑↑μ ({x | x ∈ s → p x}ᶜ) = 0)

tactic: simp [and_comm]
state_before: case e_a.e_a.h
α : Type u_1
β : Type ?u.572648
γ : Type ?u.572651
δ : Type ?u.572654
ι : Type ?u.572657
R : Type ?u.572660
R' : Type ?u.572663
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
p : α → Prop
hs : MeasurableSet s
x : α
⊢ x ∈ {x | p x}ᶜ ∩ s ↔ x ∈ {x | x ∈ s → p x}ᶜ
Theorem: MeasureTheory.Measure.singularPart_withDensity
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: rw [zero_add]
state_before: α : Type u_1
β : Type ?u.55804
m : MeasurableSpace α
μ ν✝ ν : Measure α
f : α → ℝ≥0∞
hf : Measurable f
⊢ withDensity ν f = 0 + withDensity ν f
Theorem: ENNReal.toReal_iSup
File: Mathlib/Data/Real/ENNReal.lean

tactic: simp only [ENNReal.toReal, toNNReal_iSup hf, NNReal.coe_iSup]
state_before: α : Type ?u.843793
β : Type ?u.843796
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
f g : ι → ℝ≥0∞
hf : ∀ (i : ι), f i ≠ ⊤
⊢ ENNReal.toReal (iSup f) = ⨆ (i : ι), ENNReal.toReal (f i)
Theorem: csInf_inv
File: Mathlib/Algebra/Order/Pointwise.lean

tactic: rw [← image_inv]
state_before: α : Type u_1
inst✝³ : ConditionallyCompleteLattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
s t : Set α
hs₀ : Set.Nonempty s
hs₁ : BddAbove s
⊢ sInf s⁻¹ = (sSup s)⁻¹

tactic: exact ((OrderIso.inv α).map_csSup' hs₀ hs₁).symm
state_before: α : Type u_1
inst✝³ : ConditionallyCompleteLattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
s t : Set α
hs₀ : Set.Nonempty s
hs₁ : BddAbove s
⊢ sInf (Inv.inv '' s) = (sSup s)⁻¹
Theorem: Function.leftInverse_of_surjective_of_rightInverse
File: Mathlib/Init/Function.lean

tactic: rw [← hx, rfg]
state_before: α : Sort u₁
β : Sort u₂
φ : Sort u₃
δ : Sort u₄
ζ : Sort u₅
f : α → β
g : β → α
surjf : Surjective f
rfg : RightInverse f g
y : β
x : α
hx : f x = y
⊢ f (g y) = y
Theorem: collinear_iff_not_affineIndependent
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [collinear_iff_finrank_le_one,
  finrank_vectorSpan_le_iff_not_affineIndependent k p (Fintype.card_fin 3)]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.274898
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p : Fin 3 → P
⊢ Collinear k (Set.range p) ↔ ¬AffineIndependent k p