tasksource/leandojo huggingface dataset:
Theorem: Int.units_natAbs
File: Mathlib/Data/Int/Units.lean

tactic: rw [← natAbs_mul, Units.mul_inv]
state_before: u : ℤˣ
⊢ natAbs ↑u * natAbs ↑u⁻¹ = 1

tactic: rfl
state_before: u : ℤˣ
⊢ natAbs 1 = 1

tactic: rw [← natAbs_mul, Units.inv_mul]
state_before: u : ℤˣ
⊢ natAbs ↑u⁻¹ * natAbs ↑u = 1

tactic: rfl
state_before: u : ℤˣ
⊢ natAbs 1 = 1
Theorem: mulRothNumber_lt_of_forall_not_mulSalemSpencer
File: Mathlib/Combinatorics/Additive/SalemSpencer.lean

tactic: obtain ⟨t, hts, hcard, ht⟩ := mulRothNumber_spec s
state_before: F : Type ?u.142257
α : Type u_1
β : Type ?u.142263
𝕜 : Type ?u.142266
E : Type ?u.142269
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t : Finset α
n : ℕ
h : ∀ (t : Finset α), t ∈ powersetLen n s → ¬MulSalemSpencer ↑t
⊢ ↑mulRothNumber s < n

tactic: rw [← hcard, ← not_le]
state_before: case intro.intro.intro
F : Type ?u.142257
α : Type u_1
β : Type ?u.142263
𝕜 : Type ?u.142266
E : Type ?u.142269
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t✝ : Finset α
n : ℕ
h : ∀ (t : Finset α), t ∈ powersetLen n s → ¬MulSalemSpencer ↑t
t : Finset α
hts : t ⊆ s
hcard : card t = ↑mulRothNumber s
ht : MulSalemSpencer ↑t
⊢ ↑mulRothNumber s < n

tactic: intro hn
state_before: case intro.intro.intro
F : Type ?u.142257
α : Type u_1
β : Type ?u.142263
𝕜 : Type ?u.142266
E : Type ?u.142269
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t✝ : Finset α
n : ℕ
h : ∀ (t : Finset α), t ∈ powersetLen n s → ¬MulSalemSpencer ↑t
t : Finset α
hts : t ⊆ s
hcard : card t = ↑mulRothNumber s
ht : MulSalemSpencer ↑t
⊢ ¬n ≤ card t

tactic: obtain ⟨u, hut, rfl⟩ := exists_smaller_set t n hn
state_before: case intro.intro.intro
F : Type ?u.142257
α : Type u_1
β : Type ?u.142263
𝕜 : Type ?u.142266
E : Type ?u.142269
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t✝ : Finset α
n : ℕ
h : ∀ (t : Finset α), t ∈ powersetLen n s → ¬MulSalemSpencer ↑t
t : Finset α
hts : t ⊆ s
hcard : card t = ↑mulRothNumber s
ht : MulSalemSpencer ↑t
hn : n ≤ card t
⊢ False

tactic: exact h _ (mem_powersetLen.2 ⟨hut.trans hts, rfl⟩) (ht.mono hut)
state_before: case intro.intro.intro.intro.intro
F : Type ?u.142257
α : Type u_1
β : Type ?u.142263
𝕜 : Type ?u.142266
E : Type ?u.142269
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t✝ t : Finset α
hts : t ⊆ s
hcard : card t = ↑mulRothNumber s
ht : MulSalemSpencer ↑t
u : Finset α
hut : u ⊆ t
h : ∀ (t : Finset α), t ∈ powersetLen (card u) s → ¬MulSalemSpencer ↑t
hn : card u ≤ card t
⊢ False
Theorem: Filter.map_comap_setCoe_val
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [map_comap, Subtype.range_val]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.256913
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s✝ : Set α
t : Set β
f : Filter β
s : Set β
⊢ map Subtype.val (comap Subtype.val f) = f ⊓ 𝓟 s
Theorem: Ordinal.le_cof_iff_blsub
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: simpa using H _ hf
state_before: α : Type ?u.37432
r : α → α → Prop
b : Ordinal
a : Cardinal
H : ∀ {ι : Type u} (f : ι → Ordinal), lsub f = b → a ≤ (#ι)
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
hf : blsub o f = b
⊢ a ≤ card o

tactic: rcases Cardinal.ord_eq ι with ⟨r, hr, hι'⟩
state_before: α : Type ?u.37432
r : α → α → Prop
b : Ordinal
a : Cardinal
H : ∀ {o : Ordinal} (f : (a : Ordinal) → a < o → Ordinal), blsub o f = b → a ≤ card o
ι : Type u
f : ι → Ordinal
hf : lsub f = b
⊢ a ≤ (#ι)

tactic: rw [← @blsub_eq_lsub' ι r hr] at hf
state_before: case intro.intro
α : Type ?u.37432
r✝ : α → α → Prop
b : Ordinal
a : Cardinal
H : ∀ {o : Ordinal} (f : (a : Ordinal) → a < o → Ordinal), blsub o f = b → a ≤ card o
ι : Type u
f : ι → Ordinal
hf : lsub f = b
r : ι → ι → Prop
hr : IsWellOrder ι r
hι' : ord (#ι) = type r
⊢ a ≤ (#ι)

tactic: simpa using H _ hf
state_before: case intro.intro
α : Type ?u.37432
r✝ : α → α → Prop
b : Ordinal
a : Cardinal
H : ∀ {o : Ordinal} (f : (a : Ordinal) → a < o → Ordinal), blsub o f = b → a ≤ card o
ι : Type u
f : ι → Ordinal
r : ι → ι → Prop
hr : IsWellOrder ι r
hf : blsub (type r) (bfamilyOfFamily' r f) = b
hι' : ord (#ι) = type r
⊢ a ≤ (#ι)
Theorem: ConvexCone.coe_iInf
File: Mathlib/Analysis/Convex/Cone/Basic.lean

tactic: simp [iInf]
state_before: 𝕜 : Type u_2
E : Type u_3
F : Type ?u.9687
G : Type ?u.9690
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
S T : ConvexCone 𝕜 E
ι : Sort u_1
f : ι → ConvexCone 𝕜 E
⊢ ↑(iInf f) = ⋂ (i : ι), ↑(f i)
Theorem: εNFA.εClosure_empty
File: Mathlib/Computability/EpsilonNFA.lean

tactic: induction hs <;> assumption
state_before: α : Type u
σ σ' : Type v
M : εNFA α σ
S : Set σ
x : List α
s✝ : σ
a : α
s : σ
hs : s ∈ εClosure M ∅
⊢ False
Theorem: SimpleGraph.Walk.edges_copy
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : Walk G u v
hu : u = u'
hv : v = v'
⊢ edges (Walk.copy p hu hv) = edges p

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : Walk G u' v'
⊢ edges (Walk.copy p (_ : u' = u') (_ : v' = v')) = edges p
Theorem: Stirling.log_stirlingSeq_formula
File: Mathlib/Analysis/SpecialFunctions/Stirling.lean

tactic: rw [stirlingSeq, log_div, log_mul, sqrt_eq_rpow, log_rpow, Real.log_pow, tsub_tsub] <;> positivity
state_before: n : ℕ
⊢ Real.log (stirlingSeq (succ n)) =
    Real.log ↑(succ n)! - 1 / 2 * Real.log (2 * ↑(succ n)) - ↑(succ n) * Real.log (↑(succ n) / exp 1)
Theorem: MeasureTheory.MeasurePreserving.set_lintegral_comp_preimage
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [← hg.map_eq, set_lintegral_map hs hf hg.measurable]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1687278
δ : Type ?u.1687281
m : MeasurableSpace α
μ ν✝ : Measure α
mb : MeasurableSpace β
ν : Measure β
g : α → β
hg : MeasurePreserving g
s : Set β
hs : MeasurableSet s
f : β → ℝ≥0∞
hf : Measurable f
⊢ (∫⁻ (a : α) in g ⁻¹' s, f (g a) ∂μ) = ∫⁻ (b : β) in s, f b ∂ν
Theorem: AffineSubspace.sOppSide_iff_exists_right
File: Mathlib/Analysis/Convex/Side.lean

tactic: rw [SOppSide, and_comm, wOppSide_iff_exists_right h, and_assoc, and_congr_right_iff,
  and_congr_right_iff]
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.274203
P : Type u_3
P' : Type ?u.274209
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y p₂ : P
h : p₂ ∈ s
⊢ SOppSide s x y ↔ ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)

tactic: rintro _ hy
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.274203
P : Type u_3
P' : Type ?u.274209
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y p₂ : P
h : p₂ ∈ s
⊢ ¬x ∈ s →
    ¬y ∈ s → ((y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y))

tactic: rw [or_iff_right hy]
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.274203
P : Type u_3
P' : Type ?u.274209
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y p₂ : P
h : p₂ ∈ s
a✝ : ¬x ∈ s
hy : ¬y ∈ s
⊢ (y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)
Theorem: Multiset.rel_cons_right
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← rel_flip, rel_cons_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.445806
δ : Type ?u.445809
r : α → β → Prop
p : γ → δ → Prop
as : Multiset α
b : β
bs : Multiset β
⊢ Rel r as (b ::ₘ bs) ↔ ∃ a as', r a b ∧ Rel r as' bs ∧ as = a ::ₘ as'

tactic: refine' exists₂_congr fun a as' => _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.445806
δ : Type ?u.445809
r : α → β → Prop
p : γ → δ → Prop
as : Multiset α
b : β
bs : Multiset β
⊢ (∃ b_1 bs', flip r b b_1 ∧ Rel (flip r) bs bs' ∧ as = b_1 ::ₘ bs') ↔ ∃ a as', r a b ∧ Rel r as' bs ∧ as = a ::ₘ as'

tactic: rw [rel_flip, flip]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.445806
δ : Type ?u.445809
r : α → β → Prop
p : γ → δ → Prop
as : Multiset α
b : β
bs : Multiset β
a : α
as' : Multiset α
⊢ flip r b a ∧ Rel (flip r) bs as' ∧ as = a ::ₘ as' ↔ r a b ∧ Rel r as' bs ∧ as = a ::ₘ as'
Theorem: OrthogonalFamily.inner_right_dfinsupp
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: simp only [Dfinsupp.sum, Submodule.coe_inner, Finset.sum_ite_eq, ite_eq_left_iff,
  Dfinsupp.mem_support_toFun]
state_before: 𝕜 : Type u_3
E : Type u_4
F : Type ?u.3612607
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
dec_ι : DecidableEq ι
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
dec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)
l : ⨁ (i : ι), G i
i : ι
v : G i
⊢ (Dfinsupp.sum l fun j w => if i = j then inner (↑(V i) v) (↑(V j) w) else 0) = inner v (↑l i)

tactic: split_ifs with h
state_before: 𝕜 : Type u_3
E : Type u_4
F : Type ?u.3612607
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
dec_ι : DecidableEq ι
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
dec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)
l : ⨁ (i : ι), G i
i : ι
v : G i
⊢ (if ↑l i ≠ 0 then inner (↑(V i) v) (↑(V i) (↑l i)) else 0) = inner v (↑l i)

tactic: simp only [LinearIsometry.inner_map_map]
state_before: case inl
𝕜 : Type u_3
E : Type u_4
F : Type ?u.3612607
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
dec_ι : DecidableEq ι
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
dec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)
l : ⨁ (i : ι), G i
i : ι
v : G i
h : ↑l i ≠ 0
⊢ inner (↑(V i) v) (↑(V i) (↑l i)) = inner v (↑l i)

tactic: simp only [of_not_not h, inner_zero_right]
state_before: case inr
𝕜 : Type u_3
E : Type u_4
F : Type ?u.3612607
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
dec_ι : DecidableEq ι
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
dec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)
l : ⨁ (i : ι), G i
i : ι
v : G i
h : ¬↑l i ≠ 0
⊢ 0 = inner v (↑l i)
Theorem: Quaternion.exp_of_re_eq_zero
File: Mathlib/Analysis/NormedSpace/QuaternionExponential.lean

tactic: rw [exp_eq_tsum]
state_before: q : ℍ
hq : q.re = 0
⊢ exp ℝ q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q

tactic: refine' HasSum.tsum_eq _
state_before: q : ℍ
hq : q.re = 0
⊢ (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q

tactic: simp_rw [← expSeries_apply_eq]
state_before: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)

tactic: exact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)
state_before: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)
Theorem: fderiv_tsum
File: Mathlib/Analysis/Calculus/Series.lean

tactic: ext1 x
state_before: α : Type u_1
β : Type ?u.60538
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : CompleteSpace F
u : α → ℝ
inst✝ : NormedSpace 𝕜 F
f : α → E → F
f' : α → E → E →L[𝕜] F
v : ℕ → α → ℝ
s : Set E
x₀✝ x : E
N : ℕ∞
hu : Summable u
hf : ∀ (n : α), Differentiable 𝕜 (f n)
hf' : ∀ (n : α) (x : E), ‖fderiv 𝕜 (f n) x‖ ≤ u n
x₀ : E
hf0 : Summable fun n => f n x₀
⊢ (fderiv 𝕜 fun y => ∑' (n : α), f n y) = fun x => ∑' (n : α), fderiv 𝕜 (f n) x

tactic: exact fderiv_tsum_apply hu hf hf' hf0 x
state_before: case h
α : Type u_1
β : Type ?u.60538
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : CompleteSpace F
u : α → ℝ
inst✝ : NormedSpace 𝕜 F
f : α → E → F
f' : α → E → E →L[𝕜] F
v : ℕ → α → ℝ
s : Set E
x₀✝ x✝ : E
N : ℕ∞
hu : Summable u
hf : ∀ (n : α), Differentiable 𝕜 (f n)
hf' : ∀ (n : α) (x : E), ‖fderiv 𝕜 (f n) x‖ ≤ u n
x₀ : E
hf0 : Summable fun n => f n x₀
x : E
⊢ fderiv 𝕜 (fun y => ∑' (n : α), f n y) x = ∑' (n : α), fderiv 𝕜 (f n) x
Theorem: Nat.sum_totient
File: Mathlib/Data/Nat/Totient.lean

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: n : ℕ
⊢ Finset.sum (divisors n) φ = n

tactic: rw [← sum_div_divisors n φ]
state_before: case inr
n : ℕ
hn : n > 0
⊢ Finset.sum (divisors n) φ = n

tactic: have : n = ∑ d : ℕ in n.divisors, (filter (fun k : ℕ => n.gcd k = d) (range n)).card := by
  nth_rw 1 [← card_range n]
  refine' card_eq_sum_card_fiberwise fun x _ => mem_divisors.2 ⟨_, hn.ne'⟩
  apply gcd_dvd_left
state_before: case inr
n : ℕ
hn : n > 0
⊢ ∑ d in divisors n, φ (n / d) = n

tactic: nth_rw 3 [this]
state_before: case inr
n : ℕ
hn : n > 0
this : n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))
⊢ ∑ d in divisors n, φ (n / d) = n

tactic: exact sum_congr rfl fun x hx => totient_div_of_dvd (dvd_of_mem_divisors hx)
state_before: case inr
n : ℕ
hn : n > 0
this : n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))
⊢ ∑ d in divisors n, φ (n / d) = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))

tactic: simp
state_before: case inl

⊢ Finset.sum (divisors 0) φ = 0

tactic: nth_rw 1 [← card_range n]
state_before: n : ℕ
hn : n > 0
⊢ n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))

tactic: refine' card_eq_sum_card_fiberwise fun x _ => mem_divisors.2 ⟨_, hn.ne'⟩
state_before: n : ℕ
hn : n > 0
⊢ Finset.card (range n) = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))

tactic: apply gcd_dvd_left
state_before: n : ℕ
hn : n > 0
x : ℕ
x✝ : x ∈ range n
⊢ gcd n x ∣ n
Theorem: Matrix.rank_transpose_mul_self
File: Mathlib/Data/Matrix/Rank.lean

tactic: dsimp only [rank]
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ rank (Aᵀ ⬝ A) = rank A

tactic: refine' add_left_injective (finrank R <| LinearMap.ker A.mulVecLin) _
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } = finrank R { x // x ∈ LinearMap.range (mulVecLin A) }

tactic: dsimp only
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })
      (finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) }) =
    (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })
      (finrank R { x // x ∈ LinearMap.range (mulVecLin A) })

tactic: trans finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } +
  finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ ⬝ A)) }
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =
    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }

tactic: rw [ker_mulVecLin_transpose_mul_self]
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =
    finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } +
      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ ⬝ A)) }

tactic: simp only [LinearMap.finrank_range_add_finrank_ker]
state_before: l : Type ?u.270349
m : Type u_1
n : Type u_2
o : Type ?u.270358
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : Fintype m
inst✝ : LinearOrderedField R
A : Matrix m n R
⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ ⬝ A)) } +
      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ ⬝ A)) } =
    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }
Theorem: MeasureTheory.zero_memℒp
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [snorm_zero]
state_before: α : Type u_2
E : Type u_1
F : Type ?u.934741
G : Type ?u.934744
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ snorm 0 p μ < ⊤

tactic: exact ENNReal.coe_lt_top
state_before: α : Type u_2
E : Type u_1
F : Type ?u.934741
G : Type ?u.934744
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ 0 < ⊤
Theorem: Nat.gcd_eq_left_iff_dvd
File: Std/Data/Nat/Gcd.lean

tactic: rw [gcd_rec, mod_eq_zero_of_dvd h, gcd_zero_left]
state_before: m n : Nat
h : m ∣ n
⊢ gcd m n = m
Theorem: isRegular_mul_and_mul_iff
File: Mathlib/Algebra/Regular/Basic.lean

tactic: refine' ⟨_, _⟩
state_before: R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular (a * b) ∧ IsRegular (b * a) ↔ IsRegular a ∧ IsRegular b

tactic: rintro ⟨ab, ba⟩
state_before: case refine'_1
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular (a * b) ∧ IsRegular (b * a) → IsRegular a ∧ IsRegular b

tactic: exact
  ⟨⟨IsLeftRegular.of_mul ba.left, IsRightRegular.of_mul ab.right⟩,
    ⟨IsLeftRegular.of_mul ab.left, IsRightRegular.of_mul ba.right⟩⟩
state_before: case refine'_1.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ab : IsRegular (a * b)
ba : IsRegular (b * a)
⊢ IsRegular a ∧ IsRegular b

tactic: rintro ⟨ha, hb⟩
state_before: case refine'_2
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular a ∧ IsRegular b → IsRegular (a * b) ∧ IsRegular (b * a)

tactic: exact
  ⟨⟨(mul_isLeftRegular_iff _ ha.left).mpr hb.left,
      (mul_isRightRegular_iff _ hb.right).mpr ha.right⟩,
    ⟨(mul_isLeftRegular_iff _ hb.left).mpr ha.left,
      (mul_isRightRegular_iff _ ha.right).mpr hb.right⟩⟩
state_before: case refine'_2.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ha : IsRegular a
hb : IsRegular b
⊢ IsRegular (a * b) ∧ IsRegular (b * a)
Theorem: Rat.neg_divInt_neg
File: Std/Data/Rat/Lemmas.lean

tactic: match den with
| Nat.succ n => simp [divInt, Int.neg_ofNat_succ, normalize_eq_mkRat, Int.neg_neg]
| 0 => rfl
| Int.negSucc n => simp [divInt, Int.neg_negSucc, normalize_eq_mkRat, Int.neg_neg]
state_before: num den : Int
⊢ -num /. -den = num /. den

tactic: simp [divInt, Int.neg_ofNat_succ, normalize_eq_mkRat, Int.neg_neg]
state_before: num den : Int
n : Nat
⊢ -num /. -↑(Nat.succ n) = num /. ↑(Nat.succ n)

tactic: rfl
state_before: num den : Int
⊢ -num /. -0 = num /. 0

tactic: simp [divInt, Int.neg_negSucc, normalize_eq_mkRat, Int.neg_neg]
state_before: num den : Int
n : Nat
⊢ -num /. -Int.negSucc n = num /. Int.negSucc n
Theorem: Nat.count_succ
File: Mathlib/Data/Nat/Count.lean

tactic: split_ifs with h <;> simp [count, List.range_succ, h]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
⊢ count p (n + 1) = count p n + if p n then 1 else 0
Theorem: Subalgebra.coe_iSup_of_directed
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: simp only [Set.mem_iUnion, SetLike.mem_coe]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ 0 ∈
    {
          toSubsemigroup :=
            { carrier := ⋃ (i : ι), ↑(S i),
              mul_mem' :=
                (_ : ∀ {a b : A}, (a ∈ ⋃ (i : ι), ↑(S i)) → (b ∈ ⋃ (i : ι), ↑(S i)) → a * b ∈ ⋃ (i : ι), ↑(S i)) },
          one_mem' :=
            (_ :
              1 ∈
                { carrier := ⋃ (i : ι), ↑(S i),
                    mul_mem' :=
                      (_ :
                        ∀ {a b : A},
                          (a ∈ ⋃ (i : ι), ↑(S i)) →
                            (b ∈ ⋃ (i : ι), ↑(S i)) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier) }.toSubsemigroup.carrier

tactic: exact ⟨i, zero_mem _⟩
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ ∃ i, 0 ∈ S i

tactic: simp only [Set.mem_iUnion, SetLike.mem_coe]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ 1 ∈
    { carrier := ⋃ (i : ι), ↑(S i),
        mul_mem' :=
          (_ : ∀ {a b : A}, (a ∈ ⋃ (i : ι), ↑(S i)) → (b ∈ ⋃ (i : ι), ↑(S i)) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier

tactic: exact ⟨i, one_mem _⟩
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ ∃ i, 1 ∈ S i
Theorem: Set.ext_iff
File: Mathlib/Data/Set/Basic.lean

tactic: rw [h]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
h : s = t
x : α
⊢ x ∈ s ↔ x ∈ t
Theorem: NNReal.sqrt_eq_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: refine' NNReal.eq _
state_before: x : ℝ≥0
⊢ ↑sqrt x = x ^ (1 / 2)

tactic: push_cast
state_before: x : ℝ≥0
⊢ ↑(↑sqrt x) = ↑(x ^ (1 / 2))

tactic: exact Real.sqrt_eq_rpow x.1
state_before: x : ℝ≥0
⊢ Real.sqrt ↑x = ↑x ^ (1 / 2)