tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.integral_undef
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: rw [integral]
state_before: α : Type u_2
E : Type u_1
F : Type ?u.822154
𝕜 : Type ?u.822157
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : CompleteSpace E
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : SMulCommClass ℝ 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f g : α → E
m : MeasurableSpace α
μ : Measure α
h : ¬Integrable f
⊢ (∫ (a : α), f a ∂μ) = 0

tactic: exact @dif_neg _ (id _) h _ _ _
state_before: α : Type u_2
E : Type u_1
F : Type ?u.822154
𝕜 : Type ?u.822157
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : CompleteSpace E
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : SMulCommClass ℝ 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f g : α → E
m : MeasurableSpace α
μ : Measure α
h : ¬Integrable f
⊢ (if hf : Integrable fun a => f a then L1.integral (Integrable.toL1 (fun a => f a) hf) else 0) = 0
Theorem: Filter.bliminf_false
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp [bliminf_eq]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.100877
ι : Type ?u.100880
inst✝ : CompleteLattice α
f : Filter β
u : β → α
⊢ (bliminf u f fun x => False) = ⊤
Theorem: Ordinal.principal_nfp_blsub₂
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: rw [lt_nfp] at *
state_before: op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
ha : a < nfp (blsub₂ op) o
hb : b < nfp (blsub₂ op) o
⊢ op a b < nfp (blsub₂ op) o

tactic: cases' ha with m hm
state_before: op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
ha : ∃ n, a < (blsub₂ op^[n]) o
hb : ∃ n, b < (blsub₂ op^[n]) o
⊢ ∃ n, op a b < (blsub₂ op^[n]) o

tactic: cases' hb with n hn
state_before: case intro
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
hb : ∃ n, b < (blsub₂ op^[n]) o
m : ℕ
hm : a < (blsub₂ op^[m]) o
⊢ ∃ n, op a b < (blsub₂ op^[n]) o

tactic: cases' le_total ((blsub₂.{u, u} op^[m]) o) ((blsub₂.{u, u} op^[n]) o) with h h
state_before: case intro.intro
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
⊢ ∃ n, op a b < (blsub₂ op^[n]) o

tactic: use n + 1
state_before: case intro.intro.inl
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[m]) o ≤ (blsub₂ op^[n]) o
⊢ ∃ n, op a b < (blsub₂ op^[n]) o

tactic: rw [Function.iterate_succ']
state_before: case intro.intro.inl
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[m]) o ≤ (blsub₂ op^[n]) o
⊢ op a b < (blsub₂ op^[n + 1]) o

tactic: exact lt_blsub₂ op (hm.trans_le h) hn
state_before: case intro.intro.inl
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[m]) o ≤ (blsub₂ op^[n]) o
⊢ op a b < (blsub₂ op ∘ blsub₂ op^[n]) o

tactic: use m + 1
state_before: case intro.intro.inr
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[n]) o ≤ (blsub₂ op^[m]) o
⊢ ∃ n, op a b < (blsub₂ op^[n]) o

tactic: rw [Function.iterate_succ']
state_before: case intro.intro.inr
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[n]) o ≤ (blsub₂ op^[m]) o
⊢ op a b < (blsub₂ op^[m + 1]) o

tactic: exact lt_blsub₂ op hm (hn.trans_le h)
state_before: case intro.intro.inr
op : Ordinal → Ordinal → Ordinal
o a b : Ordinal
m : ℕ
hm : a < (blsub₂ op^[m]) o
n : ℕ
hn : b < (blsub₂ op^[n]) o
h : (blsub₂ op^[n]) o ≤ (blsub₂ op^[m]) o
⊢ op a b < (blsub₂ op ∘ blsub₂ op^[m]) o
Theorem: Finset.image_image₂_antidistrib_left
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_3
α' : Type ?u.93400
β : Type u_4
β' : Type u_5
γ : Type u_2
γ' : Type ?u.93412
δ : Type u_1
δ' : Type ?u.93418
ε : Type ?u.93421
ε' : Type ?u.93424
ζ : Type ?u.93427
ζ' : Type ?u.93430
ν : Type ?u.93433
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f'✝ : α → β → γ
g✝ g'✝ : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
g : γ → δ
f' : β' → α → δ
g' : β → β'
h_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a
⊢ ↑(image g (image₂ f s t)) = ↑(image₂ f' (image g' t) s)

tactic: exact image_image2_antidistrib_left h_antidistrib
state_before: α : Type u_3
α' : Type ?u.93400
β : Type u_4
β' : Type u_5
γ : Type u_2
γ' : Type ?u.93412
δ : Type u_1
δ' : Type ?u.93418
ε : Type ?u.93421
ε' : Type ?u.93424
ζ : Type ?u.93427
ζ' : Type ?u.93430
ν : Type ?u.93433
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f'✝ : α → β → γ
g✝ g'✝ : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
g : γ → δ
f' : β' → α → δ
g' : β → β'
h_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a
⊢ g '' image2 f ↑s ↑t = image2 f' (g' '' ↑t) ↑s
Theorem: Matrix.ker_mulVecLin_eq_bot_iff
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: simp only [Submodule.eq_bot_iff, LinearMap.mem_ker, Matrix.mulVecLin_apply]
state_before: R : Type u_2
inst✝¹ : CommSemiring R
k : Type ?u.306834
l : Type ?u.306837
m : Type ?u.306840
n : Type u_1
inst✝ : Fintype n
M : Matrix n n R
⊢ ker (mulVecLin M) = ⊥ ↔ ∀ (v : n → R), mulVec M v = 0 → v = 0
Theorem: Finmap.keys_erase_toFinset
File: Mathlib/Data/Finmap.lean

tactic: simp [Finset.erase, keys, AList.erase, keys_kerase]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
s : AList β
⊢ keys ⟦AList.erase a s⟧ = Finset.erase (keys ⟦s⟧) a
Theorem: Ordinal.nfp_add_eq_mul_omega
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: apply le_antisymm (nfp_le_fp (add_isNormal a).monotone hba _)
state_before: a b : Ordinal
hba : b ≤ a * ω
⊢ nfp (fun x => a + x) b = a * ω

tactic: rw [← nfp_add_zero]
state_before: a b : Ordinal
hba : b ≤ a * ω
⊢ a * ω ≤ nfp ((fun x x_1 => x + x_1) a) b

tactic: exact nfp_monotone (add_isNormal a).monotone (Ordinal.zero_le b)
state_before: a b : Ordinal
hba : b ≤ a * ω
⊢ nfp (fun x => a + x) 0 ≤ nfp ((fun x x_1 => x + x_1) a) b

tactic: dsimp
state_before: a b : Ordinal
hba : b ≤ a * ω
⊢ (fun x x_1 => x + x_1) a (a * ω) ≤ a * ω

tactic: rw [← mul_one_add, one_add_omega]
state_before: a b : Ordinal
hba : b ≤ a * ω
⊢ a + a * ω ≤ a * ω
Theorem: FreeGroup.red_invRev_iff
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: simpa only [invRev_invRev] using h.invRev
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
h : Red (invRev L₁) (invRev L₂)
⊢ Red L₁ L₂
Theorem: Convex.add_smul_sub_mem_interior'
File: Mathlib/Analysis/Convex/Topology.lean

tactic: simpa only [sub_smul, smul_sub, one_smul, add_sub, add_comm] using
  hs.combo_interior_closure_mem_interior hy hx ht.1 (sub_nonneg.mpr ht.2)
    (add_sub_cancel'_right _ _)
state_before: ι : Type ?u.112869
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
x y : E
hx : x ∈ closure s
hy : y ∈ interior s
t : 𝕜
ht : t ∈ Ioc 0 1
⊢ x + t • (y - x) ∈ interior s
Theorem: Filter.eventually_prod_iff
File: Mathlib/Order/Filter/Prod.lean

tactic: simpa only [Set.prod_subset_iff] using @mem_prod_iff α β p f g
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.6291
δ : Type ?u.6294
ι : Sort ?u.6297
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
p : α × β → Prop
f : Filter α
g : Filter β
⊢ (∀ᶠ (x : α × β) in f ×ˢ g, p x) ↔
    ∃ pa, (∀ᶠ (x : α) in f, pa x) ∧ ∃ pb, (∀ᶠ (y : β) in g, pb y) ∧ ∀ {x : α}, pa x → ∀ {y : β}, pb y → p (x, y)
Theorem: Finsupp.card_support_le_one'
File: Mathlib/Data/Finsupp/Defs.lean

tactic: simp only [card_le_one_iff_subset_singleton, support_subset_singleton']
state_before: α : Type u_1
β : Type ?u.137863
γ : Type ?u.137866
ι : Type ?u.137869
M : Type u_2
M' : Type ?u.137875
N : Type ?u.137878
P : Type ?u.137881
G : Type ?u.137884
H : Type ?u.137887
R : Type ?u.137890
S : Type ?u.137893
inst✝¹ : Zero M
a a' : α
b : M
inst✝ : Nonempty α
f : α →₀ M
⊢ card f.support ≤ 1 ↔ ∃ a b, f = single a b
Theorem: integral_cos_sq
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

tactic: field_simp [integral_cos_pow, add_sub_assoc]
state_before: a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, cos x ^ 2) = (cos b * sin b - cos a * sin a + b - a) / 2
Theorem: CategoryTheory.Bicategory.hom_inv_whiskerRight
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: rw [← comp_whiskerRight, hom_inv_id, id_whiskerRight]
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f g : a ⟶ b
η : f ≅ g
h : b ⟶ c
⊢ η.hom ▷ h ≫ η.inv ▷ h = 𝟙 (f ≫ h)
Theorem: BddBelow.finite_of_bddAbove
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: let ⟨a, ha⟩ := h₀
state_before: ι : Type ?u.29058
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
s : Set α
h₀ : BddBelow s
h₁ : BddAbove s
⊢ Set.Finite s

tactic: let ⟨b, hb⟩ := h₁
state_before: ι : Type ?u.29058
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b b₁ b₂ c x : α
s : Set α
h₀ : BddBelow s
h₁ : BddAbove s
a : α
ha : a ∈ lowerBounds s
⊢ Set.Finite s

tactic: classical exact ⟨Set.fintypeOfMemBounds ha hb⟩
state_before: ι : Type ?u.29058
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b✝ b₁ b₂ c x : α
s : Set α
h₀ : BddBelow s
h₁ : BddAbove s
a : α
ha : a ∈ lowerBounds s
b : α
hb : b ∈ upperBounds s
⊢ Set.Finite s

tactic: exact ⟨Set.fintypeOfMemBounds ha hb⟩
state_before: ι : Type ?u.29058
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b✝ b₁ b₂ c x : α
s : Set α
h₀ : BddBelow s
h₁ : BddAbove s
a : α
ha : a ∈ lowerBounds s
b : α
hb : b ∈ upperBounds s
⊢ Set.Finite s
Theorem: closure_of_rat_image_lt
File: Mathlib/Topology/Instances/Real.lean

tactic: rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add']
state_before: α : Type u
β : Type v
γ : Type w
q : ℚ
x : ℝ
hx : x ∈ {r | ↑q ≤ r}
t : Set ℝ
ht : t ∈ 𝓝 x
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ t
p : ℚ
h₁ : x < ↑p
h₂ : ↑p < x + ε
⊢ ↑p ∈ ball x ε
Theorem: AlgebraicTopology.DoldKan.cs_down_0_not_rel_left
File: Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean

tactic: intro hj
state_before: C : Type ?u.724
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
⊢ ¬ComplexShape.Rel c 0 j

tactic: dsimp at hj
state_before: C : Type ?u.724
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : ComplexShape.Rel c 0 j
⊢ False

tactic: apply Nat.not_succ_le_zero j
state_before: C : Type ?u.724
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : j + 1 = 0
⊢ False

tactic: rw [Nat.succ_eq_add_one, hj]
state_before: C : Type ?u.724
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : j + 1 = 0
⊢ Nat.succ j ≤ 0
Theorem: mul_eq_mul_left_iff
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: by_cases ha : a = 0 <;> [simp [ha]; simp [mul_right_inj', ha]]
state_before: α : Type ?u.8219
M₀ : Type u_1
G₀ : Type ?u.8225
M₀' : Type ?u.8228
G₀' : Type ?u.8231
F : Type ?u.8234
F' : Type ?u.8237
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
⊢ a * b = a * c ↔ b = c ∨ a = 0
Theorem: LiouvilleWith.sub_rat_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [sub_eq_add_neg, ← Rat.cast_neg, add_rat_iff]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x - ↑r) ↔ LiouvilleWith p x
Theorem: Polynomial.subsingleton_iff_subsingleton
File: Mathlib/Data/Polynomial/Basic.lean

tactic: intro
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ Subsingleton R → Subsingleton R[X]

tactic: infer_instance
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
a✝ : Subsingleton R
⊢ Subsingleton R[X]
Theorem: Finset.map_toDual_max
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [min_eq_inf_withTop, inf_image]
state_before: F : Type ?u.349735
α : Type u_1
β : Type ?u.349741
γ : Type ?u.349744
ι : Type ?u.349747
κ : Type ?u.349750
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
⊢ WithBot.map (↑toDual) (Finset.max s) = Finset.min (image (↑toDual) s)

tactic: exact congr_fun Option.map_id _
state_before: F : Type ?u.349735
α : Type u_1
β : Type ?u.349741
γ : Type ?u.349744
ι : Type ?u.349747
κ : Type ?u.349750
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
⊢ WithBot.map (↑toDual) (Finset.max s) = inf s (WithTop.some ∘ ↑toDual)
Theorem: Set.mem_dite_univ_left
File: Mathlib/Data/Set/Basic.lean

tactic: simp [mem_dite]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t✝ t₁ t₂ u : Set α
p : Prop
inst✝ : Decidable p
t : ¬p → Set α
x : α
⊢ (x ∈ if h : p then univ else t h) ↔ ∀ (h : ¬p), x ∈ t h
Theorem: Complex.log_conj
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: rw [log_conj_eq_ite, if_neg h]
state_before: x : ℂ
h : arg x ≠ π
⊢ log (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (log x)
Theorem: Int.abs_le_floor_nnreal_iff
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [Int.abs_eq_natAbs, Int.ofNat_le, Nat.le_floor_iff (zero_le c), NNReal.coe_natAbs z]
state_before: 𝓕 : Type ?u.1113180
𝕜 : Type ?u.1113183
α : Type ?u.1113186
ι : Type ?u.1113189
κ : Type ?u.1113192
E : Type ?u.1113195
F : Type ?u.1113198
G : Type ?u.1113201
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
z : ℤ
c : ℝ≥0
⊢ abs z ≤ ↑⌊c⌋₊ ↔ ‖z‖₊ ≤ c
Theorem: MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp only [edist_eq_coe_nnnorm]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.687641
δ : Type ?u.687644
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ∂μ) = ∫⁻ (a : α), edist (f a) 0 ∂μ
Theorem: Filter.not_tendsto_iff_exists_frequently_nmem
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp only [tendsto_iff_forall_eventually_mem, not_forall, exists_prop, Filter.Frequently, not_not]
state_before: ι : Type u_2
ι' : Type ?u.367980
α : Type u_1
β : Type ?u.367986
γ : Type ?u.367989
x : ι → α
f : Filter α
l : Filter ι
⊢ ¬Tendsto x l f ↔ ∃ s, s ∈ f ∧ ∃ᶠ (n : ι) in l, ¬x n ∈ s
Theorem: GeneralizedContinuedFraction.squashSeq_eq_self_of_terminated
File: Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

tactic: change s.get? (n + 1) = none at terminated_at_succ_n
state_before: K : Type u_1
n : ℕ
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_succ_n : Stream'.Seq.TerminatedAt s (n + 1)
⊢ squashSeq s n = s

tactic: cases s_nth_eq : s.get? n <;> simp only [*, squashSeq]
state_before: K : Type u_1
n : ℕ
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_succ_n : Stream'.Seq.get? s (n + 1) = none
⊢ squashSeq s n = s
Theorem: PEquiv.mul_matrix_apply
File: Mathlib/Data/Matrix/PEquiv.lean

tactic: dsimp [toMatrix, Matrix.mul_apply]
state_before: k : Type ?u.1962
l : Type u_2
m : Type u_1
n : Type u_3
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : l ≃. m
M : Matrix m n α
i : l
j : n
⊢ (toMatrix f ⬝ M) i j = Option.casesOn (↑f i) 0 fun fi => M fi j

tactic: cases' h : f i with fi
state_before: k : Type ?u.1962
l : Type u_2
m : Type u_1
n : Type u_3
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : l ≃. m
M : Matrix m n α
i : l
j : n
⊢ (Finset.sum Finset.univ fun j_1 => (if j_1 ∈ ↑f i then 1 else 0) * M j_1 j) = Option.rec 0 (fun val => M val j) (↑f i)

tactic: simp [h]
state_before: case none
k : Type ?u.1962
l : Type u_2
m : Type u_1
n : Type u_3
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : l ≃. m
M : Matrix m n α
i : l
j : n
h : ↑f i = none
⊢ (Finset.sum Finset.univ fun j_1 => (if j_1 ∈ none then 1 else 0) * M j_1 j) = Option.rec 0 (fun val => M val j) none

tactic: rw [Finset.sum_eq_single fi] <;> simp (config := { contextual := true }) [h, eq_comm]
state_before: case some
k : Type ?u.1962
l : Type u_2
m : Type u_1
n : Type u_3
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : l ≃. m
M : Matrix m n α
i : l
j : n
fi : m
h : ↑f i = some fi
⊢ (Finset.sum Finset.univ fun j_1 => (if j_1 ∈ some fi then 1 else 0) * M j_1 j) =
    Option.rec 0 (fun val => M val j) (some fi)
Theorem: BilinForm.apply_dualBasis_left
File: Mathlib/LinearAlgebra/BilinearForm.lean

tactic: rw [dualBasis, Basis.map_apply, Basis.coe_dualBasis, ← toDual_def hB,
  LinearEquiv.apply_symm_apply, Basis.coord_apply, Basis.repr_self, Finsupp.single_apply]
state_before: R : Type ?u.1768534
M : Type ?u.1768537
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
R₁ : Type ?u.1768573
M₁ : Type ?u.1768576
inst✝¹⁶ : Ring R₁
inst✝¹⁵ : AddCommGroup M₁
inst✝¹⁴ : Module R₁ M₁
R₂ : Type ?u.1769185
M₂ : Type ?u.1769188
inst✝¹³ : CommSemiring R₂
inst✝¹² : AddCommMonoid M₂
inst✝¹¹ : Module R₂ M₂
R₃ : Type ?u.1769375
M₃ : Type ?u.1769378
inst✝¹⁰ : CommRing R₃
inst✝⁹ : AddCommGroup M₃
inst✝⁸ : Module R₃ M₃
V : Type u_2
K : Type u_1
inst✝⁷ : Field K
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
M₂' : Type ?u.1771183
inst✝⁴ : AddCommMonoid M₂'
inst✝³ : Module R₂ M₂'
inst✝² : FiniteDimensional K V
ι : Type u_3
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
B : BilinForm K V
hB : Nondegenerate B
b : Basis ι K V
i j : ι
⊢ bilin B (↑(dualBasis B hB b) i) (↑b j) = if j = i then 1 else 0
Theorem: ModuleCat.MonoidalCategory.rightUnitor_naturality
File: Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean

tactic: apply TensorProduct.ext
state_before: R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
⊢ tensorHom f (𝟙 (of R R)) ≫ (rightUnitor N).hom = (rightUnitor M).hom ≫ f

tactic: apply LinearMap.ext
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
⊢ LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) (tensorHom f (𝟙 (of R R)) ≫ (rightUnitor N).hom) =
    LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) ((rightUnitor M).hom ≫ f)

tactic: intro x
state_before: case H.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
⊢ ∀ (x : ↑M),
    ↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) (tensorHom f (𝟙 (of R R)) ≫ (rightUnitor N).hom)) x =
      ↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) ((rightUnitor M).hom ≫ f)) x

tactic: apply LinearMap.ext_ring
state_before: case H.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
x : ↑M
⊢ ↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) (tensorHom f (𝟙 (of R R)) ≫ (rightUnitor N).hom)) x =
    ↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) ((rightUnitor M).hom ≫ f)) x

tactic: change ((rightUnitor N).hom) ((tensorHom f (𝟙 (of R R))) (x ⊗ₜ[R] (1 : R))) =
  f (((rightUnitor M).hom) (x ⊗ₜ[R] 1))
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
x : ↑M
⊢ ↑(↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) (tensorHom f (𝟙 (of R R)) ≫ (rightUnitor N).hom)) x) 1 =
    ↑(↑(LinearMap.compr₂ (TensorProduct.mk R ↑M ↑(of R R)) ((rightUnitor M).hom ≫ f)) x) 1

tactic: erw [TensorProduct.rid_tmul, TensorProduct.rid_tmul]
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
x : ↑M
⊢ ↑(rightUnitor N).hom (↑(tensorHom f (𝟙 (of R R))) (x ⊗ₜ[R] 1)) = ↑f (↑(rightUnitor M).hom (x ⊗ₜ[R] 1))

tactic: rw [LinearMap.map_smul]
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
x : ↑M
⊢ ↑(𝟙 (of R R)) (x, 1).snd • ↑f (x, 1).fst = ↑f (1 • x)

tactic: rfl
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
f : M ⟶ N
x : ↑M
⊢ ↑(𝟙 (of R R)) (x, 1).snd • ↑f (x, 1).fst = 1 • ↑f x
Theorem: Real.Angle.toIocMod_toReal
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ toIocMod two_pi_pos (-π) (toReal θ) = toReal θ

tactic: rw [toReal_coe]
state_before: case h
x✝ : ℝ
⊢ toIocMod two_pi_pos (-π) (toReal ↑x✝) = toReal ↑x✝

tactic: exact toIocMod_toIocMod _ _ _ _
state_before: case h
x✝ : ℝ
⊢ toIocMod two_pi_pos (-π) (toIocMod two_pi_pos (-π) x✝) = toIocMod two_pi_pos (-π) x✝
Theorem: Ideal.IsPrime.mem_of_pow_mem
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: induction' n with n ih
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
hI : IsPrime I
r : α
n : ℕ
H : r ^ n ∈ I
⊢ r ∈ I

tactic: rw [pow_zero] at H
state_before: case zero
α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
hI : IsPrime I
r : α
n : ℕ
H✝ : r ^ n ∈ I
H : r ^ Nat.zero ∈ I
⊢ r ∈ I

tactic: exact (mt (eq_top_iff_one _).2 hI.1).elim H
state_before: case zero
α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
hI : IsPrime I
r : α
n : ℕ
H✝ : r ^ n ∈ I
H : 1 ∈ I
⊢ r ∈ I

tactic: rw [pow_succ] at H
state_before: case succ
α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
hI : IsPrime I
r : α
n✝ : ℕ
H✝ : r ^ n✝ ∈ I
n : ℕ
ih : r ^ n ∈ I → r ∈ I
H : r ^ Nat.succ n ∈ I
⊢ r ∈ I

tactic: exact Or.casesOn (hI.mem_or_mem H) id ih
state_before: case succ
α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
hI : IsPrime I
r : α
n✝ : ℕ
H✝ : r ^ n✝ ∈ I
n : ℕ
ih : r ^ n ∈ I → r ∈ I
H : r * r ^ n ∈ I
⊢ r ∈ I