tasksource/leandojo huggingface dataset:
Theorem: lowerSemicontinuousOn_univ_iff
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp [LowerSemicontinuousOn, LowerSemicontinuous, lowerSemicontinuousWithinAt_univ_iff]
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
β : Type u_2
inst✝ : Preorder β
f g : α → β
x : α
s t : Set α
y z : β
⊢ LowerSemicontinuousOn f univ ↔ LowerSemicontinuous f
Theorem: isConnected_setOf_sameRay_and_ne_zero
File: Mathlib/Analysis/Convex/Normed.lean

tactic: simp_rw [← exists_pos_left_iff_sameRay_and_ne_zero hx]
state_before: ι : Type ?u.55149
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s t : Set E
x : E
hx : x ≠ 0
⊢ IsConnected {y | SameRay ℝ x y ∧ y ≠ 0}

tactic: exact isConnected_Ioi.image _ (continuous_id.smul continuous_const).continuousOn
state_before: ι : Type ?u.55149
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s t : Set E
x : E
hx : x ≠ 0
⊢ IsConnected {y | ∃ r, 0 < r ∧ r • x = y}
Theorem: coprime_sq_sub_sq_add_of_odd_even
File: Mathlib/NumberTheory/PythagoreanTriples.lean

tactic: rw [Int.gcd, ← Int.natAbs_neg (m ^ 2 - n ^ 2)]
state_before: m n : ℤ
h : Int.gcd m n = 1
hm : m % 2 = 1
hn : n % 2 = 0
⊢ Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1

tactic: rw [(by ring : -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2), add_comm]
state_before: m n : ℤ
h : Int.gcd m n = 1
hm : m % 2 = 1
hn : n % 2 = 0
⊢ Nat.gcd (Int.natAbs (-(m ^ 2 - n ^ 2))) (Int.natAbs (m ^ 2 + n ^ 2)) = 1

tactic: apply coprime_sq_sub_sq_add_of_even_odd _ hn hm
state_before: m n : ℤ
h : Int.gcd m n = 1
hm : m % 2 = 1
hn : n % 2 = 0
⊢ Nat.gcd (Int.natAbs (n ^ 2 - m ^ 2)) (Int.natAbs (n ^ 2 + m ^ 2)) = 1

tactic: rwa [Int.gcd_comm]
state_before: m n : ℤ
h : Int.gcd m n = 1
hm : m % 2 = 1
hn : n % 2 = 0
⊢ Int.gcd n m = 1

tactic: ring
state_before: m n : ℤ
h : Int.gcd m n = 1
hm : m % 2 = 1
hn : n % 2 = 0
⊢ -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2
Theorem: Finsupp.support_single_disjoint
File: Mathlib/Data/Finsupp/Defs.lean

tactic: rw [support_single_ne_zero _ hb, support_single_ne_zero _ hb', disjoint_singleton]
state_before: α : Type u_2
β : Type ?u.58510
γ : Type ?u.58513
ι : Type ?u.58516
M : Type u_1
M' : Type ?u.58522
N : Type ?u.58525
P : Type ?u.58528
G : Type ?u.58531
H : Type ?u.58534
R : Type ?u.58537
S : Type ?u.58540
inst✝ : Zero M
a a' : α
b b' : M
hb : b ≠ 0
hb' : b' ≠ 0
i j : α
⊢ Disjoint (single i b).support (single j b').support ↔ i ≠ j
Theorem: Ordinal.CNF_fst_le_log
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

tactic: refine' CNFRec b _ (fun o ho H ↦ _) o
state_before: b o : Ordinal
x : Ordinal × Ordinal
⊢ x ∈ CNF b o → x.fst ≤ log b o

tactic: rw [CNF_zero]
state_before: case refine'_1
b o : Ordinal
x : Ordinal × Ordinal
⊢ x ∈ CNF b 0 → x.fst ≤ log b 0

tactic: intro contra
state_before: case refine'_1
b o : Ordinal
x : Ordinal × Ordinal
⊢ x ∈ [] → x.fst ≤ log b 0

tactic: contradiction
state_before: case refine'_1
b o : Ordinal
x : Ordinal × Ordinal
contra : x ∈ []
⊢ x.fst ≤ log b 0

tactic: rw [CNF_ne_zero ho, mem_cons]
state_before: case refine'_2
b o✝ : Ordinal
x : Ordinal × Ordinal
o : Ordinal
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.fst ≤ log b (o % b ^ log b o)
⊢ x ∈ CNF b o → x.fst ≤ log b o

tactic: rintro (rfl | h)
state_before: case refine'_2
b o✝ : Ordinal
x : Ordinal × Ordinal
o : Ordinal
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.fst ≤ log b (o % b ^ log b o)
⊢ x = (log b o, o / b ^ log b o) ∨ x ∈ CNF b (o % b ^ log b o) → x.fst ≤ log b o

tactic: exact le_rfl
state_before: case refine'_2.inl
b o✝ o : Ordinal
ho : o ≠ 0
H : (log b o, o / b ^ log b o) ∈ CNF b (o % b ^ log b o) → (log b o, o / b ^ log b o).fst ≤ log b (o % b ^ log b o)
⊢ (log b o, o / b ^ log b o).fst ≤ log b o

tactic: exact (H h).trans (log_mono_right _ (mod_opow_log_lt_self b ho).le)
state_before: case refine'_2.inr
b o✝ : Ordinal
x : Ordinal × Ordinal
o : Ordinal
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.fst ≤ log b (o % b ^ log b o)
h : x ∈ CNF b (o % b ^ log b o)
⊢ x.fst ≤ log b o
Theorem: HahnSeries.SummableFamily.support_hsum_subset
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [mem_support, hsum_coeff, finsum_eq_sum _ (s.finite_co_support _)] at hg
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_3
s : SummableFamily Γ R α
g : Γ
hg : g ∈ support (hsum s)
⊢ g ∈ ⋃ (a : α), support (toFun s a)

tactic: obtain ⟨a, _, h2⟩ := exists_ne_zero_of_sum_ne_zero hg
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_3
s : SummableFamily Γ R α
g : Γ
hg :
  ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (toFun s a) g)), coeff (toFun s i) g ≠ 0
⊢ g ∈ ⋃ (a : α), support (toFun s a)

tactic: rw [Set.mem_iUnion]
state_before: case intro.intro
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_3
s : SummableFamily Γ R α
g : Γ
hg :
  ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (toFun s a) g)), coeff (toFun s i) g ≠ 0
a : α
left✝ : a ∈ Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (toFun s a) g))
h2 : coeff (toFun s a) g ≠ 0
⊢ g ∈ ⋃ (a : α), support (toFun s a)

tactic: exact ⟨a, h2⟩
state_before: case intro.intro
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_3
s : SummableFamily Γ R α
g : Γ
hg :
  ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (toFun s a) g)), coeff (toFun s i) g ≠ 0
a : α
left✝ : a ∈ Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (toFun s a) g))
h2 : coeff (toFun s a) g ≠ 0
⊢ ∃ i, g ∈ support (toFun s i)
Theorem: LinearMap.ker_prod_ker_le_ker_coprod
File: Mathlib/LinearAlgebra/Prod.lean

tactic: rintro ⟨y, z⟩
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂✝ : Type w
V₂ : Type w'
M₃✝ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.235722
M₆ : Type ?u.235725
inst✝¹² : Semiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₂✝
inst✝⁹ : AddCommMonoid M₃✝
inst✝⁸ : AddCommMonoid M₄
inst✝⁷ : Module R M
inst✝⁶ : Module R M₂✝
inst✝⁵ : Module R M₃✝
inst✝⁴ : Module R M₄
M₂ : Type u_1
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
M₃ : Type u_2
inst✝¹ : AddCommGroup M₃
inst✝ : Module R M₃
f : M →ₗ[R] M₃
g : M₂ →ₗ[R] M₃
⊢ Submodule.prod (ker f) (ker g) ≤ ker (coprod f g)

tactic: simp (config := { contextual := true })
state_before: case mk
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂✝ : Type w
V₂ : Type w'
M₃✝ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.235722
M₆ : Type ?u.235725
inst✝¹² : Semiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₂✝
inst✝⁹ : AddCommMonoid M₃✝
inst✝⁸ : AddCommMonoid M₄
inst✝⁷ : Module R M
inst✝⁶ : Module R M₂✝
inst✝⁵ : Module R M₃✝
inst✝⁴ : Module R M₄
M₂ : Type u_1
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
M₃ : Type u_2
inst✝¹ : AddCommGroup M₃
inst✝ : Module R M₃
f : M →ₗ[R] M₃
g : M₂ →ₗ[R] M₃
y : M
z : M₂
⊢ (y, z) ∈ Submodule.prod (ker f) (ker g) → (y, z) ∈ ker (coprod f g)
Theorem: Set.preimage_mul_const_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iio, h]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : 0 < c
⊢ (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)
Theorem: MeasureTheory.lintegral_mul_const_le
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp_rw [mul_comm, lintegral_const_mul_le r f]
state_before: α : Type u_1
β : Type ?u.945819
γ : Type ?u.945822
δ : Type ?u.945825
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
⊢ (∫⁻ (a : α), f a ∂μ) * r ≤ ∫⁻ (a : α), f a * r ∂μ
Theorem: nhdsWithin_prod
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [nhdsWithin_prod_eq]
state_before: α✝ : Type ?u.22982
β✝ : Type ?u.22985
γ : Type ?u.22988
δ : Type ?u.22991
inst✝² : TopologicalSpace α✝
α : Type u_1
inst✝¹ : TopologicalSpace α
β : Type u_2
inst✝ : TopologicalSpace β
s u : Set α
t v : Set β
a : α
b : β
hu : u ∈ 𝓝[s] a
hv : v ∈ 𝓝[t] b
⊢ u ×ˢ v ∈ 𝓝[s ×ˢ t] (a, b)

tactic: exact prod_mem_prod hu hv
state_before: α✝ : Type ?u.22982
β✝ : Type ?u.22985
γ : Type ?u.22988
δ : Type ?u.22991
inst✝² : TopologicalSpace α✝
α : Type u_1
inst✝¹ : TopologicalSpace α
β : Type u_2
inst✝ : TopologicalSpace β
s u : Set α
t v : Set β
a : α
b : β
hu : u ∈ 𝓝[s] a
hv : v ∈ 𝓝[t] b
⊢ u ×ˢ v ∈ 𝓝[s] a ×ˢ 𝓝[t] b
Theorem: Rat.inv_coe_int_den
File: Mathlib/Data/Rat/Lemmas.lean

tactic: induction a using Int.induction_on <;>
  simp [← Int.negSucc_coe', Int.negSucc_coe, -neg_add_rev, Rat.inv_neg, Int.ofNat_add_one_out,
    -Nat.cast_succ, inv_coe_nat_den_of_pos, -Int.cast_negSucc, ofInt_eq_cast]
state_before: a : ℤ
⊢ (↑a)⁻¹.den = if a = 0 then 1 else Int.natAbs a
Theorem: derivWithin_congr_set'
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: simp only [derivWithin, fderivWithin_congr_set' y h]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
y : 𝕜
h : s =ᶠ[𝓝[{y}ᶜ] x] t
⊢ derivWithin f s x = derivWithin f t x
Theorem: EMetric.hausdorffEdist_le_of_infEdist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [hausdorffEdist_def, sup_le_iff, iSup_le_iff]
state_before: ι : Sort ?u.35968
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ (x : α), x ∈ s → infEdist x t ≤ r
H2 : ∀ (x : α), x ∈ t → infEdist x s ≤ r
⊢ hausdorffEdist s t ≤ r

tactic: exact ⟨H1, H2⟩
state_before: ι : Sort ?u.35968
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ (x : α), x ∈ s → infEdist x t ≤ r
H2 : ∀ (x : α), x ∈ t → infEdist x s ≤ r
⊢ (∀ (i : α), i ∈ s → infEdist i t ≤ r) ∧ ∀ (i : α), i ∈ t → infEdist i s ≤ r
Theorem: le_tsub_mul
File: Mathlib/Algebra/Order/Sub/Basic.lean

tactic: simpa only [mul_comm _ c] using le_mul_tsub
state_before: α : Type ?u.6083
β : Type ?u.6086
inst✝⁸ : Preorder α
inst✝⁷ : Add α
inst✝⁶ : Sub α
inst✝⁵ : OrderedSub α
a✝ b✝ c✝ d : α
R : Type u_1
inst✝⁴ : CommSemiring R
inst✝³ : Preorder R
inst✝² : Sub R
inst✝¹ : OrderedSub R
inst✝ : CovariantClass R R (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : R
⊢ a * c - b * c ≤ (a - b) * c
Theorem: LinearMap.dualMap_injective_iff
File: Mathlib/LinearAlgebra/Dual.lean

tactic: refine' ⟨_, fun h => dualMap_injective_of_surjective h⟩
state_before: K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
⊢ Function.Injective ↑(dualMap f) ↔ Function.Surjective ↑f

tactic: rw [← range_eq_top, ← ker_eq_bot]
state_before: K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
⊢ Function.Injective ↑(dualMap f) → Function.Surjective ↑f

tactic: intro h
state_before: K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
⊢ ker (dualMap f) = ⊥ → range f = ⊤

tactic: apply FiniteDimensional.eq_top_of_finrank_eq
state_before: K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
h : ker (dualMap f) = ⊥
⊢ range f = ⊤

tactic: rw [← finrank_eq_zero] at h
state_before: case h
K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
h : ker (dualMap f) = ⊥
⊢ finrank K { x // x ∈ range f } = finrank K V₂

tactic: rw [← add_zero (FiniteDimensional.finrank K <| LinearMap.range f), ← h, ←
  LinearMap.finrank_range_dualMap_eq_finrank_range, LinearMap.finrank_range_add_finrank_ker,
  Subspace.dual_finrank_eq]
state_before: case h
K : Type u
inst✝⁵ : Field K
V₁ : Type v'
V₂ : Type v''
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K V₁
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V₂
f : V₁ →ₗ[K] V₂
h : finrank K { x // x ∈ ker (dualMap f) } = 0
⊢ finrank K { x // x ∈ range f } = finrank K V₂
Theorem: IsAntichain.subsingleton
File: Mathlib/Order/Antichain.lean

tactic: rintro a ha b hb
state_before: α : Type u_1
β : Type ?u.1530
r r₁ r₂ : α → α → Prop
r' : β → β → Prop
s t : Set α
a b : α
inst✝ : IsTrichotomous α r
h : IsAntichain r s
⊢ Set.Subsingleton s

tactic: obtain hab | hab | hab := trichotomous_of r a b
state_before: α : Type u_1
β : Type ?u.1530
r r₁ r₂ : α → α → Prop
r' : β → β → Prop
s t : Set α
a✝ b✝ : α
inst✝ : IsTrichotomous α r
h : IsAntichain r s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
⊢ a = b

tactic: exact h.eq ha hb hab
state_before: case inl
α : Type u_1
β : Type ?u.1530
r r₁ r₂ : α → α → Prop
r' : β → β → Prop
s t : Set α
a✝ b✝ : α
inst✝ : IsTrichotomous α r
h : IsAntichain r s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
hab : r a b
⊢ a = b

tactic: exact hab
state_before: case inr.inl
α : Type u_1
β : Type ?u.1530
r r₁ r₂ : α → α → Prop
r' : β → β → Prop
s t : Set α
a✝ b✝ : α
inst✝ : IsTrichotomous α r
h : IsAntichain r s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
hab : a = b
⊢ a = b

tactic: exact h.eq' ha hb hab
state_before: case inr.inr
α : Type u_1
β : Type ?u.1530
r r₁ r₂ : α → α → Prop
r' : β → β → Prop
s t : Set α
a✝ b✝ : α
inst✝ : IsTrichotomous α r
h : IsAntichain r s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
hab : r b a
⊢ a = b
Theorem: Basis.det_comp_basis
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: rw [Basis.det_apply, ← LinearMap.det_toMatrix b', LinearMap.toMatrix_comp _ b, Matrix.det_mul,
  LinearMap.toMatrix_basis_equiv, Matrix.det_one, mul_one]
state_before: R : Type ?u.2655796
inst✝⁹ : CommRing R
M : Type u_4
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M' : Type u_2
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M'
ι : Type u_3
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Module A M
inst✝ : Module A M'
b : Basis ι A M
b' : Basis ι A M'
f : M →ₗ[A] M'
⊢ ↑(det b') (↑f ∘ ↑b) = ↑LinearMap.det (LinearMap.comp f ↑(Basis.equiv b' b (Equiv.refl ι)))

tactic: congr 1
state_before: R : Type ?u.2655796
inst✝⁹ : CommRing R
M : Type u_4
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M' : Type u_2
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M'
ι : Type u_3
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Module A M
inst✝ : Module A M'
b : Basis ι A M
b' : Basis ι A M'
f : M →ₗ[A] M'
⊢ Matrix.det (toMatrix b' (↑f ∘ ↑b)) = Matrix.det (↑(LinearMap.toMatrix b b') f)

tactic: ext (i j)
state_before: case e_M
R : Type ?u.2655796
inst✝⁹ : CommRing R
M : Type u_4
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M' : Type u_2
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M'
ι : Type u_3
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Module A M
inst✝ : Module A M'
b : Basis ι A M
b' : Basis ι A M'
f : M →ₗ[A] M'
⊢ toMatrix b' (↑f ∘ ↑b) = ↑(LinearMap.toMatrix b b') f

tactic: rw [Basis.toMatrix_apply, LinearMap.toMatrix_apply, Function.comp_apply]
state_before: case e_M.a.h
R : Type ?u.2655796
inst✝⁹ : CommRing R
M : Type u_4
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M' : Type u_2
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M'
ι : Type u_3
inst✝⁴ : DecidableEq ι
inst✝³ : Fintype ι
e : Basis ι R M
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Module A M
inst✝ : Module A M'
b : Basis ι A M
b' : Basis ι A M'
f : M →ₗ[A] M'
i j : ι
⊢ toMatrix b' (↑f ∘ ↑b) i j = ↑(LinearMap.toMatrix b b') f i j
Theorem: Turing.fun_respects
File: Mathlib/Computability/TuringMachine.lean

tactic: cases f₁ a₁ <;> simp only [FRespects, Respects, exists_eq_left', forall_eq']
state_before: σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂
a₁ : σ₁
⊢ (∀ ⦃a₂ : σ₂⦄,
      (fun a b => tr a = b) a₁ a₂ →
        match f₁ a₁ with
        | some b₁ => ∃ b₂, (fun a b => tr a = b) b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂
        | none => f₂ a₂ = none) ↔
    FRespects f₂ tr (tr a₁) (f₁ a₁)
Theorem: InnerProductGeometry.norm_sub_eq_add_norm_of_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← sq_eq_sq (norm_nonneg (x - y)) (add_nonneg (norm_nonneg x) (norm_nonneg y)),
  norm_sub_pow_two_real, inner_eq_neg_mul_norm_of_angle_eq_pi h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = π
⊢ ‖x - y‖ = ‖x‖ + ‖y‖

tactic: ring
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = π
⊢ ‖x‖ ^ 2 - 2 * -(‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
Theorem: RingHom.is_integral_sub
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: simpa only [sub_eq_add_neg] using f.is_integral_add hx (f.is_integral_neg hy)
state_before: R : Type u_1
A : Type ?u.654670
B : Type ?u.654673
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
x y : S
hx : IsIntegralElem f x
hy : IsIntegralElem f y
⊢ IsIntegralElem f (x - y)
Theorem: Subspace.finrank_dualCoannihilator_eq
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [Submodule.dualCoannihilator, ← Module.evalEquiv_toLinearMap]
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W : Subspace K V
V₁ : Type ?u.1339846
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
Φ : Subspace K (Module.Dual K V)
⊢ finrank K { x // x ∈ dualCoannihilator Φ } = finrank K { x // x ∈ dualAnnihilator Φ }

tactic: exact LinearEquiv.finrank_eq (LinearEquiv.ofSubmodule' _ _)
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W : Subspace K V
V₁ : Type ?u.1339846
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
Φ : Subspace K (Module.Dual K V)
⊢ finrank K { x // x ∈ comap (↑(Module.evalEquiv K V)) (dualAnnihilator Φ) } = finrank K { x // x ∈ dualAnnihilator Φ }
Theorem: CategoryTheory.FreeBicategory.liftHom₂_congr
File: Mathlib/CategoryTheory/Bicategory/Free.lean

tactic: induction H <;> (dsimp [liftHom₂]; aesop_cat)
state_before: B : Type u₁
inst✝¹ : Quiver B
C : Type u₂
inst✝ : Bicategory C
F : B ⥤q C
a b : FreeBicategory B
f g : a ⟶ b
η θ : Hom₂ f g
H : Rel η θ
⊢ liftHom₂ F η = liftHom₂ F θ

tactic: dsimp [liftHom₂]
state_before: case triangle
B : Type u₁
inst✝¹ : Quiver B
C : Type u₂
inst✝ : Bicategory C
F : B ⥤q C
a b : FreeBicategory B
f g : a ⟶ b
η θ : Hom₂ f g
a✝ b✝ c✝ : B
f✝ : Hom a✝ b✝
g✝ : Hom b✝ c✝
⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.associator f✝ (Hom.id b✝) g✝) (Hom₂.whisker_left f✝ (Hom₂.left_unitor g✝))) =
    liftHom₂ F (Hom₂.whisker_right g✝ (Hom₂.right_unitor f✝))

tactic: aesop_cat
state_before: case triangle
B : Type u₁
inst✝¹ : Quiver B
C : Type u₂
inst✝ : Bicategory C
F : B ⥤q C
a b : FreeBicategory B
f g : a ⟶ b
η θ : Hom₂ f g
a✝ b✝ c✝ : B
f✝ : Hom a✝ b✝
g✝ : Hom b✝ c✝
⊢ (α_ (liftHom F f✝) (𝟙 (F.obj b✝)) (liftHom F g✝)).hom ≫ liftHom F f✝ ◁ (λ_ (liftHom F g✝)).hom =
    (ρ_ (liftHom F f✝)).hom ▷ liftHom F g✝
Theorem: Real.Angle.tan_coe_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [tan_coe, Real.tan_pi]
state_before: ⊢ tan ↑π = 0
Theorem: toAdd_list_sum
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: simp [toAdd, ofAdd]
state_before: ι : Type ?u.994730
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : AddMonoid α
s : List (Multiplicative α)
⊢ ↑toAdd (List.prod s) = List.sum (List.map (↑toAdd) s)

tactic: rfl
state_before: ι : Type ?u.994730
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : AddMonoid α
s : List (Multiplicative α)
⊢ List.prod s = List.sum s
Theorem: List.length_eq_countp_add_countp
File: Mathlib/Data/List/Count.lean

tactic: induction' l with x h ih
state_before: α : Type u_1
l✝ : List α
p q : α → Bool
l : List α
⊢ length l = countp p l + countp (fun a => decide ¬p a = true) l

tactic: by_cases h : p x
state_before: case cons
α : Type u_1
l : List α
p q : α → Bool
x : α
h : List α
ih : length h = countp p h + countp (fun a => decide ¬p a = true) h
⊢ length (x :: h) = countp p (x :: h) + countp (fun a => decide ¬p a = true) (x :: h)

tactic: rfl
state_before: case nil
α : Type u_1
l : List α
p q : α → Bool
⊢ length [] = countp p [] + countp (fun a => decide ¬p a = true) []

tactic: rw [countp_cons_of_pos _ _ h, countp_cons_of_neg _ _ _, length, ih]
state_before: case pos
α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : p x = true
⊢ length (x :: h✝) = countp p (x :: h✝) + countp (fun a => decide ¬p a = true) (x :: h✝)

tactic: ac_rfl
state_before: case pos
α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : p x = true
⊢ countp p h✝ + countp (fun a => decide ¬p a = true) h✝ + 1 = countp p h✝ + 1 + countp (fun a => decide ¬p a = true) h✝

tactic: simp only [h]
state_before: α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : p x = true
⊢ ¬(decide ¬p x = true) = true

tactic: rw [countp_cons_of_pos (fun a => ¬p a) _ _, countp_cons_of_neg _ _ h, length, ih]
state_before: case neg
α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : ¬p x = true
⊢ length (x :: h✝) = countp p (x :: h✝) + countp (fun a => decide ¬p a = true) (x :: h✝)

tactic: ac_rfl
state_before: case neg
α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : ¬p x = true
⊢ countp p h✝ + countp (fun a => decide ¬p a = true) h✝ + 1 =
    countp p h✝ + (countp (fun a => decide ¬p a = true) h✝ + 1)

tactic: simp only [h]
state_before: α : Type u_1
l : List α
p q : α → Bool
x : α
h✝ : List α
ih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝
h : ¬p x = true
⊢ (fun a => decide ¬p a = true) x = true
Theorem: Nat.mem_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

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

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

tactic: simp [properDivisors]
state_before: case inl
n : ℕ
⊢ n ∈ properDivisors 0 ↔ n ∣ 0 ∧ n < 0
Theorem: MvPolynomial.weightedTotalDegree'_eq_bot_iff
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: simp only [weightedTotalDegree', Finset.sup_eq_bot_iff, mem_support_iff, WithBot.coe_ne_bot,
  MvPolynomial.eq_zero_iff]
state_before: R : Type u_2
M : Type u_3
inst✝² : CommSemiring R
σ : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : SemilatticeSup M
w : σ → M
p : MvPolynomial σ R
⊢ weightedTotalDegree' w p = ⊥ ↔ p = 0

tactic: exact forall_congr' fun _ => Classical.not_not
state_before: R : Type u_2
M : Type u_3
inst✝² : CommSemiring R
σ : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : SemilatticeSup M
w : σ → M
p : MvPolynomial σ R
⊢ (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0