tasksource/leandojo huggingface dataset:
Theorem: iUnion_Ioc_add_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: refine' eq_univ_iff_forall.mpr fun b => mem_iUnion.mpr _
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a : α
⊢ (⋃ (n : ℤ), Ioc (a + n • p) (a + (n + 1) • p)) = univ

tactic: rcases sub_toIocDiv_zsmul_mem_Ioc hp a b with ⟨hl, hr⟩
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a b : α
⊢ ∃ i, b ∈ Ioc (a + i • p) (a + (i + 1) • p)

tactic: refine' ⟨toIocDiv hp a b, ⟨lt_sub_iff_add_lt.mp hl, _⟩⟩
state_before: case intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a b : α
hl : a < b - toIocDiv hp a b • p
hr : b - toIocDiv hp a b • p ≤ a + p
⊢ ∃ i, b ∈ Ioc (a + i • p) (a + (i + 1) • p)

tactic: rw [add_smul, one_smul, ← add_assoc]
state_before: case intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a b : α
hl : a < b - toIocDiv hp a b • p
hr : b - toIocDiv hp a b • p ≤ a + p
⊢ b ≤ a + (toIocDiv hp a b + 1) • p

tactic: convert sub_le_iff_le_add.mp hr using 1
state_before: case intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a b : α
hl : a < b - toIocDiv hp a b • p
hr : b - toIocDiv hp a b • p ≤ a + p
⊢ b ≤ a + toIocDiv hp a b • p + p

tactic: abel
state_before: case h.e'_4
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a b : α
hl : a < b - toIocDiv hp a b • p
hr : b - toIocDiv hp a b • p ≤ a + p
⊢ a + toIocDiv hp a b • p + p = a + p + toIocDiv hp a b • p
Theorem: min_mul_distrib
File: Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

tactic: cases' le_total a b with hb hb
state_before: α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
⊢ min a (b * c) = min a (min a b * min a c)

tactic: simp [hb, le_mul_right]
state_before: case inl
α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
hb : a ≤ b
⊢ min a (b * c) = min a (min a b * min a c)

tactic: cases' le_total a c with hc hc
state_before: case inr
α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
hb : b ≤ a
⊢ min a (b * c) = min a (min a b * min a c)

tactic: simp [hc, le_mul_left]
state_before: case inr.inl
α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
hb : b ≤ a
hc : a ≤ c
⊢ min a (b * c) = min a (min a b * min a c)

tactic: simp [hb, hc]
state_before: case inr.inr
α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
hb : b ≤ a
hc : c ≤ a
⊢ min a (b * c) = min a (min a b * min a c)
Theorem: PadicInt.coe_int_eq
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: suffices (z1 : ℚ_[p]) = z2 ↔ z1 = z2 from Iff.trans (by norm_cast) this
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ
⊢ ↑z1 = ↑z2 ↔ z1 = z2

tactic: norm_cast
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ
⊢ ↑z1 = ↑z2 ↔ z1 = z2

tactic: norm_cast
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ
this : ↑z1 = ↑z2 ↔ z1 = z2
⊢ ↑z1 = ↑z2 ↔ ↑z1 = ↑z2
Theorem: Num.le_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← not_lt]
state_before: α : Type ?u.241636
m n : Num
⊢ ↑m ≤ ↑n ↔ m ≤ n

tactic: exact not_congr lt_to_nat
state_before: α : Type ?u.241636
m n : Num
⊢ ¬↑n < ↑m ↔ m ≤ n
Theorem: Finset.max'_singleton
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [max']
state_before: F : Type ?u.343154
α : Type u_1
β : Type ?u.343160
γ : Type ?u.343163
ι : Type ?u.343166
κ : Type ?u.343169
inst✝ : LinearOrder α
s : Finset α
H : Finset.Nonempty s
x a : α
⊢ max' {a} (_ : Finset.Nonempty {a}) = a
Theorem: Order.Ico_succ_left_of_not_isMax
File: Mathlib/Order/SuccPred/Basic.lean

tactic: rw [← Ici_inter_Iio, Ici_succ_of_not_isMax ha, Ioi_inter_Iio]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
ha : ¬IsMax a
⊢ Ico (succ a) b = Ioo a b
Theorem: LocallyFinite.finite_nonempty_inter_compact
File: Mathlib/Topology/SubsetProperties.lean

tactic: choose U hxU hUf using hf
state_before: α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t : Set α
ι : Type u_1
f : ι → Set α
hf : LocallyFinite f
s : Set α
hs : IsCompact s
⊢ Set.Finite {i | Set.Nonempty (f i ∩ s)}

tactic: rcases hs.elim_nhds_subcover U fun x _ => hxU x with ⟨t, -, hsU⟩
state_before: α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t : Set α
ι : Type u_1
f : ι → Set α
s : Set α
hs : IsCompact s
U : α → Set α
hxU : ∀ (x : α), U x ∈ 𝓝 x
hUf : ∀ (x : α), Set.Finite {i | Set.Nonempty (f i ∩ U x)}
⊢ Set.Finite {i | Set.Nonempty (f i ∩ s)}

tactic: refine' (t.finite_toSet.biUnion fun x _ => hUf x).subset _
state_before: case intro.intro
α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t✝ : Set α
ι : Type u_1
f : ι → Set α
s : Set α
hs : IsCompact s
U : α → Set α
hxU : ∀ (x : α), U x ∈ 𝓝 x
hUf : ∀ (x : α), Set.Finite {i | Set.Nonempty (f i ∩ U x)}
t : Finset α
hsU : s ⊆ ⋃ (x : α) (_ : x ∈ t), U x
⊢ Set.Finite {i | Set.Nonempty (f i ∩ s)}

tactic: rintro i ⟨x, hx⟩
state_before: case intro.intro
α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t✝ : Set α
ι : Type u_1
f : ι → Set α
s : Set α
hs : IsCompact s
U : α → Set α
hxU : ∀ (x : α), U x ∈ 𝓝 x
hUf : ∀ (x : α), Set.Finite {i | Set.Nonempty (f i ∩ U x)}
t : Finset α
hsU : s ⊆ ⋃ (x : α) (_ : x ∈ t), U x
⊢ {i | Set.Nonempty (f i ∩ s)} ⊆ ⋃ (i : α) (_ : i ∈ ↑t), {i_1 | Set.Nonempty (f i_1 ∩ U i)}

tactic: rcases mem_iUnion₂.1 (hsU hx.2) with ⟨c, hct, hcx⟩
state_before: case intro.intro.intro
α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t✝ : Set α
ι : Type u_1
f : ι → Set α
s : Set α
hs : IsCompact s
U : α → Set α
hxU : ∀ (x : α), U x ∈ 𝓝 x
hUf : ∀ (x : α), Set.Finite {i | Set.Nonempty (f i ∩ U x)}
t : Finset α
hsU : s ⊆ ⋃ (x : α) (_ : x ∈ t), U x
i : ι
x : α
hx : x ∈ f i ∩ s
⊢ i ∈ ⋃ (i : α) (_ : i ∈ ↑t), {i_1 | Set.Nonempty (f i_1 ∩ U i)}

tactic: exact mem_biUnion hct ⟨x, hx.1, hcx⟩
state_before: case intro.intro.intro.intro.intro
α : Type u
β : Type v
ι✝ : Type ?u.20320
π : ι✝ → Type ?u.20325
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t✝ : Set α
ι : Type u_1
f : ι → Set α
s : Set α
hs : IsCompact s
U : α → Set α
hxU : ∀ (x : α), U x ∈ 𝓝 x
hUf : ∀ (x : α), Set.Finite {i | Set.Nonempty (f i ∩ U x)}
t : Finset α
hsU : s ⊆ ⋃ (x : α) (_ : x ∈ t), U x
i : ι
x : α
hx : x ∈ f i ∩ s
c : α
hct : c ∈ t
hcx : x ∈ U c
⊢ i ∈ ⋃ (i : α) (_ : i ∈ ↑t), {i_1 | Set.Nonempty (f i_1 ∩ U i)}
Theorem: MeasureTheory.analyticSet_iff_exists_polishSpace_range
File: Mathlib/MeasureTheory/Constructions/Polish.lean

tactic: constructor
state_before: α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
⊢ AnalyticSet s ↔ ∃ β h x f, Continuous f ∧ range f = s

tactic: intro h
state_before: case mp
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
⊢ AnalyticSet s → ∃ β h x f, Continuous f ∧ range f = s

tactic: rw [AnalyticSet] at h
state_before: case mp
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : AnalyticSet s
⊢ ∃ β h x f, Continuous f ∧ range f = s

tactic: cases' h with h h
state_before: case mp
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : s = ∅ ∨ ∃ f, Continuous f ∧ range f = s
⊢ ∃ β h x f, Continuous f ∧ range f = s

tactic: refine' ⟨Empty, inferInstance, inferInstance, Empty.elim, continuous_bot, _⟩
state_before: case mp.inl
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : s = ∅
⊢ ∃ β h x f, Continuous f ∧ range f = s

tactic: rw [h]
state_before: case mp.inl
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : s = ∅
⊢ range Empty.elim = s

tactic: exact range_eq_empty _
state_before: case mp.inl
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : s = ∅
⊢ range Empty.elim = ∅

tactic: exact ⟨ℕ → ℕ, inferInstance, inferInstance, h⟩
state_before: case mp.inr
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
h : ∃ f, Continuous f ∧ range f = s
⊢ ∃ β h x f, Continuous f ∧ range f = s

tactic: rintro ⟨β, h, h', f, f_cont, f_range⟩
state_before: case mpr
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
⊢ (∃ β h x f, Continuous f ∧ range f = s) → AnalyticSet s

tactic: skip
state_before: case mpr.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
β : Type
h : TopologicalSpace β
h' : PolishSpace β
f : β → α
f_cont : Continuous f
f_range : range f = s
⊢ AnalyticSet s

tactic: rw [← f_range]
state_before: case mpr.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
β : Type
h : TopologicalSpace β
h' : PolishSpace β
f : β → α
f_cont : Continuous f
f_range : range f = s
⊢ AnalyticSet s

tactic: exact analyticSet_range_of_polishSpace f_cont
state_before: case mpr.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
ι : Type ?u.2204
s : Set α
β : Type
h : TopologicalSpace β
h' : PolishSpace β
f : β → α
f_cont : Continuous f
f_range : range f = s
⊢ AnalyticSet (range f)
Theorem: Rat.smul_one_eq_coe
File: Mathlib/Algebra/Field/Defs.lean

tactic: rw [Rat.smul_def, mul_one]
state_before: α : Type ?u.8873
β : Type ?u.8876
K : Type ?u.8879
inst✝¹ : DivisionRing K
a b : K
A : Type u_1
inst✝ : DivisionRing A
m : ℚ
⊢ m • 1 = ↑m
Theorem: AddLECancellable.tsub_mul
File: Mathlib/Algebra/Order/Ring/Canonical.lean

tactic: simp only [mul_comm _ c] at *
state_before: α : Type u
β : Type ?u.25621
inst✝³ : CanonicallyOrderedCommSemiring α
a b c : α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : IsTotal α fun x x_1 => x ≤ x_1
h : AddLECancellable (b * c)
⊢ (a - b) * c = a * c - b * c

tactic: exact h.mul_tsub
state_before: α : Type u
β : Type ?u.25621
inst✝³ : CanonicallyOrderedCommSemiring α
a b c : α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : IsTotal α fun x x_1 => x ≤ x_1
h : AddLECancellable (c * b)
⊢ c * (a - b) = c * a - c * b
Theorem: dvd_add_left
File: Mathlib/Algebra/Ring/Divisibility.lean

tactic: simpa only [add_sub_cancel] using dvd_sub H h
state_before: α : Type u_1
β : Type ?u.8932
inst✝ : NonUnitalRing α
a b c : α
h : a ∣ c
H : a ∣ b + c
⊢ a ∣ b
Theorem: Ideal.sup_eq_top_iff_isCoprime
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [eq_top_iff_one, Submodule.mem_sup]
state_before: R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y : R
⊢ span {x} ⊔ span {y} = ⊤ ↔ IsCoprime x y

tactic: constructor
state_before: R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y : R
⊢ (∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1) ↔ IsCoprime x y

tactic: rintro ⟨u, hu, v, hv, h1⟩
state_before: case mp
R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y : R
⊢ (∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1) → IsCoprime x y

tactic: rw [mem_span_singleton'] at hu hv
state_before: case mp.intro.intro.intro.intro
R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y u : R
hu : u ∈ span {x}
v : R
hv : v ∈ span {y}
h1 : u + v = 1
⊢ IsCoprime x y

tactic: rw [← hu.choose_spec, ← hv.choose_spec] at h1
state_before: case mp.intro.intro.intro.intro
R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y u : R
hu : ∃ a, a * x = u
v : R
hv : ∃ a, a * y = v
h1 : u + v = 1
⊢ IsCoprime x y

tactic: exact ⟨_, _, h1⟩
state_before: case mp.intro.intro.intro.intro
R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y u : R
hu : ∃ a, a * x = u
v : R
hv : ∃ a, a * y = v
h1 : Exists.choose hu * x + Exists.choose hv * y = 1
⊢ IsCoprime x y

tactic: exact fun ⟨u, v, h1⟩ =>
  ⟨_, mem_span_singleton'.mpr ⟨_, rfl⟩, _, mem_span_singleton'.mpr ⟨_, rfl⟩, h1⟩
state_before: case mpr
R✝ : Type u
ι : Type ?u.257363
inst✝¹ : CommSemiring R✝
I J K L : Ideal R✝
R : Type u_1
inst✝ : CommSemiring R
x y : R
⊢ IsCoprime x y → ∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1
Theorem: IsPrimitiveRoot.one_right_iff
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: clear h
state_before: M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h : IsPrimitiveRoot ζ k
⊢ IsPrimitiveRoot ζ 1 ↔ ζ = 1

tactic: constructor
state_before: M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
⊢ IsPrimitiveRoot ζ 1 ↔ ζ = 1

tactic: intro h
state_before: case mp
M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
⊢ IsPrimitiveRoot ζ 1 → ζ = 1

tactic: rw [← pow_one ζ, h.pow_eq_one]
state_before: case mp
M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h : IsPrimitiveRoot ζ 1
⊢ ζ = 1

tactic: rintro rfl
state_before: case mpr
M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
⊢ ζ = 1 → IsPrimitiveRoot ζ 1

tactic: exact one
state_before: case mpr
M : Type u_1
N : Type ?u.1873978
G : Type ?u.1873981
R : Type ?u.1873984
S : Type ?u.1873987
F : Type ?u.1873990
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
f : F
⊢ IsPrimitiveRoot 1 1
Theorem: Matrix.det_eq_sum_mul_adjugate_col
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: simpa only [det_transpose, ← adjugate_transpose] using det_eq_sum_mul_adjugate_row Aᵀ j
state_before: m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
j : n
⊢ det A = ∑ i : n, A i j * adjugate A j i
Theorem: List.attach_map_coe'
File: Mathlib/Data/List/Basic.lean

tactic: rw [attach, map_pmap]
state_before: ι : Type ?u.327995
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
f : α → β
⊢ map (fun i => f ↑i) (attach l) = map f l

tactic: exact pmap_eq_map _ _ _ _
state_before: ι : Type ?u.327995
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
f : α → β
⊢ pmap (fun a h => f ↑{ val := a, property := h }) l (_ : ∀ (x : α), x ∈ l → x ∈ l) = map f l
Theorem: RingHom.FiniteType.of_comp_finiteType
File: Mathlib/RingTheory/FiniteType.lean

tactic: let _ := f.toAlgebra
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
⊢ FiniteType g

tactic: let _ := g.toAlgebra
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
x✝ : Algebra A B := toAlgebra f
⊢ FiniteType g

tactic: let _ := (g.comp f).toAlgebra
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
x✝¹ : Algebra A B := toAlgebra f
x✝ : Algebra B C := toAlgebra g
⊢ FiniteType g

tactic: let _ : IsScalarTower A B C := RestrictScalars.isScalarTower A B C
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
x✝² : Algebra A B := toAlgebra f
x✝¹ : Algebra B C := toAlgebra g
x✝ : Algebra A C := toAlgebra (RingHom.comp g f)
⊢ FiniteType g

tactic: let _ : Algebra.FiniteType A C := h
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
x✝³ : Algebra A B := toAlgebra f
x✝² : Algebra B C := toAlgebra g
x✝¹ : Algebra A C := toAlgebra (RingHom.comp g f)
x✝ : IsScalarTower A B C := RestrictScalars.isScalarTower A B C
⊢ FiniteType g

tactic: exact Algebra.FiniteType.of_restrictScalars_finiteType A B C
state_before: A : Type u_1
B : Type u_2
C : Type u_3
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
f : A →+* B
g : B →+* C
h : FiniteType (RingHom.comp g f)
x✝⁴ : Algebra A B := toAlgebra f
x✝³ : Algebra B C := toAlgebra g
x✝² : Algebra A C := toAlgebra (RingHom.comp g f)
x✝¹ : IsScalarTower A B C := RestrictScalars.isScalarTower A B C
x✝ : Algebra.FiniteType A C := h
⊢ FiniteType g
Theorem: List.ofFnRec_ofFn
File: Mathlib/Data/List/OfFn.lean

tactic: have := (@equivSigmaTuple α).rightInverse_symm
state_before: α : Type u
C : List α → Sort u_1
h : (n : ℕ) → (f : Fin n → α) → C (ofFn f)
n : ℕ
f : Fin n → α
⊢ ofFnRec h (ofFn f) = h n f

tactic: dsimp [equivSigmaTuple] at this
state_before: α : Type u
C : List α → Sort u_1
h : (n : ℕ) → (f : Fin n → α) → C (ofFn f)
n : ℕ
f : Fin n → α
this : Function.RightInverse ↑equivSigmaTuple.symm ↑equivSigmaTuple
⊢ ofFnRec h (ofFn f) = h n f

tactic: have := this.cast_eq (fun s => h s.1 s.2) ⟨n, f⟩
state_before: α : Type u
C : List α → Sort u_1
h : (n : ℕ) → (f : Fin n → α) → C (ofFn f)
n : ℕ
f : Fin n → α
this : Function.RightInverse (fun f => ofFn f.snd) fun l => { fst := length l, snd := get l }
⊢ ofFnRec h (ofFn f) = h n f

tactic: dsimp only at this
state_before: α : Type u
C : List α → Sort u_1
h : (n : ℕ) → (f : Fin n → α) → C (ofFn f)
n : ℕ
f : Fin n → α
this✝ : Function.RightInverse (fun f => ofFn f.snd) fun l => { fst := length l, snd := get l }
this :
  cast
      (_ :
        C (ofFn { fst := length (ofFn { fst := n, snd := f }.snd), snd := get (ofFn { fst := n, snd := f }.snd) }.snd) =
          C (ofFn { fst := n, snd := f }.snd))
      (h { fst := length (ofFn { fst := n, snd := f }.snd), snd := get (ofFn { fst := n, snd := f }.snd) }.fst
        { fst := length (ofFn { fst := n, snd := f }.snd), snd := get (ofFn { fst := n, snd := f }.snd) }.snd) =
    h { fst := n, snd := f }.fst { fst := n, snd := f }.snd
⊢ ofFnRec h (ofFn f) = h n f

tactic: rw [ofFnRec, ← this]
state_before: α : Type u
C : List α → Sort u_1
h : (n : ℕ) → (f : Fin n → α) → C (ofFn f)
n : ℕ
f : Fin n → α
this✝ : Function.RightInverse (fun f => ofFn f.snd) fun l => { fst := length l, snd := get l }
this :
  cast (_ : C (ofFn { fst := length (ofFn f), snd := get (ofFn f) }.snd) = C (ofFn { fst := n, snd := f }.snd))
      (h (length (ofFn f)) (get (ofFn f))) =
    h n f
⊢ ofFnRec h (ofFn f) = h n f
Theorem: circleMap_sub_center
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: simp [circleMap]
state_before: E : Type ?u.4746
inst✝ : NormedAddCommGroup E
c : ℂ
R θ : ℝ
⊢ circleMap c R θ - c = circleMap 0 R θ
Theorem: Monoid.pow_exponent_eq_one
File: Mathlib/GroupTheory/Exponent.lean

tactic: by_cases ExponentExists G
state_before: G : Type u
inst✝ : Monoid G
g : G
⊢ g ^ exponent G = 1

tactic: simp_rw [exponent, dif_pos h]
state_before: case pos
G : Type u
inst✝ : Monoid G
g : G
h : ExponentExists G
⊢ g ^ exponent G = 1

tactic: exact (Nat.find_spec h).2 g
state_before: case pos
G : Type u
inst✝ : Monoid G
g : G
h : ExponentExists G
⊢ g ^ Nat.find h = 1

tactic: simp_rw [exponent, dif_neg h, pow_zero]
state_before: case neg
G : Type u
inst✝ : Monoid G
g : G
h : ¬ExponentExists G
⊢ g ^ exponent G = 1
Theorem: ZFSet.IsTransitive.inter
File: Mathlib/SetTheory/ZFC/Ordinal.lean

tactic: rw [mem_inter] at hz⊢
state_before: x y z✝ : ZFSet
hx : IsTransitive x
hy : IsTransitive y
z : ZFSet
hz : z ∈ x ∩ y
w : ZFSet
hw : w ∈ z
⊢ w ∈ x ∩ y

tactic: exact ⟨hx.mem_trans hw hz.1, hy.mem_trans hw hz.2⟩
state_before: x y z✝ : ZFSet
hx : IsTransitive x
hy : IsTransitive y
z : ZFSet
hz : z ∈ x ∧ z ∈ y
w : ZFSet
hw : w ∈ z
⊢ w ∈ x ∧ w ∈ y
Theorem: List.Func.nil_add
File: Mathlib/Data/List/Func.lean

tactic: rw [add, @nil_pointwise α α α ⟨0⟩ ⟨0⟩]
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ add [] as = as

tactic: apply Eq.trans _ (map_id as)
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun x => default + x) as = as

tactic: congr with x
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun x => default + x) as = map id as

tactic: exact zero_add x
state_before: case e_f.h
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
x : α
⊢ default + x = id x
Theorem: Int.gcd_zero_right
File: Mathlib/Data/Int/GCD.lean

tactic: simp [gcd]
state_before: i : ℤ
⊢ gcd i 0 = natAbs i
Theorem: Stream'.WSeq.head_cons
File: Mathlib/Data/Seq/WSeq.lean

tactic: simp [head]
state_before: α : Type u
β : Type v
γ : Type w
a : α
s : WSeq α
⊢ head (cons a s) = Computation.pure (some a)
Theorem: Lists.lt_sizeof_cons'
File: Mathlib/SetTheory/Lists.lean

tactic: simp only [Sigma.mk.sizeOf_spec, Lists'.cons'.sizeOf_spec, lt_add_iff_pos_right]
state_before: α : Type u_1
b : Bool
a : Lists' α b
l : Lists' α true
⊢ sizeOf { fst := b, snd := a } < sizeOf (Lists'.cons' a l)

tactic: apply sizeof_pos
state_before: α : Type u_1
b : Bool
a : Lists' α b
l : Lists' α true
⊢ 0 < sizeOf l
Theorem: Homeomorph.map_cocompact
File: Mathlib/Topology/Homeomorph.lean

tactic: rw [← h.comap_cocompact, map_comap_of_surjective h.surjective]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.62010
δ : Type ?u.62013
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
h : α ≃ₜ β
⊢ map (↑h) (cocompact α) = cocompact β
Theorem: norm_smul_inv_norm
File: Mathlib/Analysis/NormedSpace/IsROrC.lean

tactic: have : ‖x‖ ≠ 0 := by simp [hx]
state_before: 𝕜 : Type u_2
inst✝² : IsROrC 𝕜
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x ≠ 0
⊢ ‖(↑‖x‖)⁻¹ • x‖ = 1

tactic: field_simp [norm_smul]
state_before: 𝕜 : Type u_2
inst✝² : IsROrC 𝕜
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x ≠ 0
this : ‖x‖ ≠ 0
⊢ ‖(↑‖x‖)⁻¹ • x‖ = 1

tactic: simp [hx]
state_before: 𝕜 : Type u_2
inst✝² : IsROrC 𝕜
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x ≠ 0
⊢ ‖x‖ ≠ 0
Theorem: Basis.tensorProduct_apply'
File: Mathlib/LinearAlgebra/TensorProductBasis.lean

tactic: simp [Basis.tensorProduct]
state_before: R : Type u_2
M : Type u_3
N : Type u_5
ι : Type u_1
κ : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
i : ι × κ
⊢ ↑(tensorProduct b c) i = ↑b i.fst ⊗ₜ[R] ↑c i.snd
Theorem: MeasureTheory.Content.outerMeasure_exists_compact
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: rw [μ.outerMeasure_opens] at hU⊢
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : Opens G
hU : ↑(Content.outerMeasure μ) ↑U ≠ ⊤
ε : ℝ≥0
hε : ε ≠ 0
⊢ ∃ K, ↑K ⊆ ↑U ∧ ↑(Content.outerMeasure μ) ↑U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε

tactic: rcases μ.innerContent_exists_compact hU hε with ⟨K, h1K, h2K⟩
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : Opens G
hU : innerContent μ U ≠ ⊤
ε : ℝ≥0
hε : ε ≠ 0
⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε

tactic: exact ⟨K, h1K, le_trans h2K <| add_le_add_right (μ.le_outerMeasure_compacts K) _⟩
state_before: case intro.intro
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : Opens G
hU : innerContent μ U ≠ ⊤
ε : ℝ≥0
hε : ε ≠ 0
K : Compacts G
h1K : ↑K ⊆ ↑U
h2K : innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε
⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε