tasksource/leandojo huggingface dataset:
Theorem: List.isPrefix.filter
File: Std/Data/List/Lemmas.lean

tactic: obtain ⟨xs, rfl⟩ := h
state_before: α : Type u_1
p : α → Bool
l₁ l₂ : List α
h : l₁ <+: l₂
⊢ List.filter p l₁ <+: List.filter p l₂

tactic: rw [filter_append]
state_before: case intro
α : Type u_1
p : α → Bool
l₁ xs : List α
⊢ List.filter p l₁ <+: List.filter p (l₁ ++ xs)

tactic: apply prefix_append
state_before: case intro
α : Type u_1
p : α → Bool
l₁ xs : List α
⊢ List.filter p l₁ <+: List.filter p l₁ ++ List.filter p xs
Theorem: Ico_toDual
File: Mathlib/Order/LocallyFinite.lean

tactic: refine' Eq.trans _ map_refl.symm
state_before: α : Type u_1
β : Type ?u.112926
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ico (↑toDual a) (↑toDual b) = map (Equiv.toEmbedding toDual) (Ioc b a)

tactic: ext c
state_before: α : Type u_1
β : Type ?u.112926
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ico (↑toDual a) (↑toDual b) = Ioc b a

tactic: rw [mem_Ico, mem_Ioc (α := α)]
state_before: case a
α : Type u_1
β : Type ?u.112926
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : (fun x => αᵒᵈ) a
⊢ c ∈ Ico (↑toDual a) (↑toDual b) ↔ c ∈ Ioc b a

tactic: exact and_comm
state_before: case a
α : Type u_1
β : Type ?u.112926
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : (fun x => αᵒᵈ) a
⊢ ↑toDual a ≤ c ∧ c < ↑toDual b ↔ b < c ∧ c ≤ a
Theorem: Fin.snoc_eq_cons_rotate
File: Mathlib/Logic/Equiv/Fin.lean

tactic: ext ⟨i, h⟩
state_before: m n : ℕ
α : Type u_1
v : Fin n → α
a : α
⊢ snoc v a = fun i => cons a v (↑(finRotate (n + 1)) i)

tactic: by_cases h' : i < n
state_before: case h.mk
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
⊢ snoc v a { val := i, isLt := h } = cons a v (↑(finRotate (n + 1)) { val := i, isLt := h })

tactic: rw [finRotate_of_lt h', Fin.snoc, Fin.cons, dif_pos h']
state_before: case pos
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : i < n
⊢ snoc v a { val := i, isLt := h } = cons a v (↑(finRotate (n + 1)) { val := i, isLt := h })

tactic: rfl
state_before: case pos
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : i < n
⊢ _root_.cast (_ : α = α) (v (castLT { val := i, isLt := h } h')) =
    cases a v { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }

tactic: have h'' : n = i := by
  simp only [not_lt] at h'
  exact (Nat.eq_of_le_of_lt_succ h' h).symm
state_before: case neg
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : ¬i < n
⊢ snoc v a { val := i, isLt := h } = cons a v (↑(finRotate (n + 1)) { val := i, isLt := h })

tactic: subst h''
state_before: case neg
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : ¬i < n
h'' : n = i
⊢ snoc v a { val := i, isLt := h } = cons a v (↑(finRotate (n + 1)) { val := i, isLt := h })

tactic: rw [finRotate_last', Fin.snoc, Fin.cons, dif_neg (lt_irrefl _)]
state_before: case neg
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
h : n < n + 1
h' : ¬n < n
⊢ snoc v a { val := n, isLt := h } = cons a v (↑(finRotate (n + 1)) { val := n, isLt := h })

tactic: rfl
state_before: case neg
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
h : n < n + 1
h' : ¬n < n
⊢ _root_.cast (_ : α = α) a = cases a v { val := 0, isLt := (_ : 0 < Nat.succ n) }

tactic: simp only [not_lt] at h'
state_before: m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : ¬i < n
⊢ n = i

tactic: exact (Nat.eq_of_le_of_lt_succ h' h).symm
state_before: m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : n ≤ i
⊢ n = i
Theorem: Submodule.subtype_comp_ofLe
File: Mathlib/LinearAlgebra/Basic.lean

tactic: ext ⟨b, hb⟩
state_before: R : Type u_1
R₁ : Type ?u.394963
R₂ : Type ?u.394966
R₃ : Type ?u.394969
R₄ : Type ?u.394972
S : Type ?u.394975
K : Type ?u.394978
K₂ : Type ?u.394981
M : Type u_2
M' : Type ?u.394987
M₁ : Type ?u.394990
M₂ : Type ?u.394993
M₃ : Type ?u.394996
M₄ : Type ?u.394999
N : Type ?u.395002
N₂ : Type ?u.395005
ι : Type ?u.395008
V : Type ?u.395011
V₂ : Type ?u.395014
inst✝¹³ : Semiring R
inst✝¹² : Semiring R₂
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₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
p✝ p' : Submodule R M
q✝ q' : Submodule R₂ M₂
q₁ q₁' : Submodule R M'
r : R
x y : M
p q : Submodule R M
h : p ≤ q
⊢ LinearMap.comp (Submodule.subtype q) (ofLe h) = Submodule.subtype p

tactic: rfl
state_before: case h.mk
R : Type u_1
R₁ : Type ?u.394963
R₂ : Type ?u.394966
R₃ : Type ?u.394969
R₄ : Type ?u.394972
S : Type ?u.394975
K : Type ?u.394978
K₂ : Type ?u.394981
M : Type u_2
M' : Type ?u.394987
M₁ : Type ?u.394990
M₂ : Type ?u.394993
M₃ : Type ?u.394996
M₄ : Type ?u.394999
N : Type ?u.395002
N₂ : Type ?u.395005
ι : Type ?u.395008
V : Type ?u.395011
V₂ : Type ?u.395014
inst✝¹³ : Semiring R
inst✝¹² : Semiring R₂
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₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
p✝ p' : Submodule R M
q✝ q' : Submodule R₂ M₂
q₁ q₁' : Submodule R M'
r : R
x y : M
p q : Submodule R M
h : p ≤ q
b : M
hb : b ∈ p
⊢ ↑(LinearMap.comp (Submodule.subtype q) (ofLe h)) { val := b, property := hb } =
    ↑(Submodule.subtype p) { val := b, property := hb }
Theorem: Polynomial.adjoin_rootSet_eq_range
File: Mathlib/Data/Polynomial/Splits.lean

tactic: rw [← image_rootSet h f, Algebra.adjoin_image, ← Algebra.map_top]
state_before: F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
inst✝¹ : Algebra F K
inst✝ : Algebra F L
p : F[X]
h : Splits (algebraMap F K) p
f : K →ₐ[F] L
⊢ Algebra.adjoin F (rootSet p L) = AlgHom.range f ↔ Algebra.adjoin F (rootSet p K) = ⊤

tactic: exact (Subalgebra.map_injective f.toRingHom.injective).eq_iff
state_before: F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
inst✝¹ : Algebra F K
inst✝ : Algebra F L
p : F[X]
h : Splits (algebraMap F K) p
f : K →ₐ[F] L
⊢ Subalgebra.map f (Algebra.adjoin F (rootSet p K)) = Subalgebra.map f ⊤ ↔ Algebra.adjoin F (rootSet p K) = ⊤
Theorem: Commute.mul_mul_mul_comm
File: Mathlib/Algebra/Group/Commute.lean

tactic: simp only [hbc.left_comm, mul_assoc]
state_before: G : Type ?u.3529
S : Type u_1
inst✝ : Semigroup S
a✝ b c : S
hbc : Commute b c
a d : S
⊢ a * b * (c * d) = a * c * (b * d)
Theorem: Set.biUnion_Ioc_eq_Ioi_self_iff
File: Mathlib/Data/Set/Intervals/Disjoint.lean

tactic: simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def]
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
⊢ (⋃ (i : ι) (hi : p i), Ioc a (f i hi)) = Ioi a ↔ ∀ (x : α), a < x → ∃ i hi, x ≤ f i hi
Theorem: CircleDeg1Lift.iterate_pos_eq_iff
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simpa only [nsmul_eq_mul, add_right_iterate] using
  (f.commute_add_int m).iterate_pos_eq_iff_map_eq f.monotone (strictMono_id.add_const (m : ℝ)) hn
state_before: f g : CircleDeg1Lift
x : ℝ
m : ℤ
n : ℕ
hn : 0 < n
⊢ (↑f^[n]) x = x + ↑n * ↑m ↔ ↑f x = x + ↑m
Theorem: Fintype.card_of_subtype
File: Mathlib/Data/Fintype/Card.lean

tactic: rw [← subtype_card s H]
state_before: α : Type u_1
β : Type ?u.3349
γ : Type ?u.3352
p : α → Prop
s : Finset α
H : ∀ (x : α), x ∈ s ↔ p x
inst✝ : Fintype { x // p x }
⊢ card { x // p x } = Finset.card s

tactic: congr
state_before: α : Type u_1
β : Type ?u.3349
γ : Type ?u.3352
p : α → Prop
s : Finset α
H : ∀ (x : α), x ∈ s ↔ p x
inst✝ : Fintype { x // p x }
⊢ card { x // p x } = card { x // p x }

tactic: apply Subsingleton.elim
state_before: case h.e_2.h
α : Type u_1
β : Type ?u.3349
γ : Type ?u.3352
p : α → Prop
s : Finset α
H : ∀ (x : α), x ∈ s ↔ p x
inst✝ : Fintype { x // p x }
⊢ inst✝ = Fintype.subtype s H
Theorem: Nat.mul_dvd_mul
File: Std/Data/Nat/Lemmas.lean

tactic: simp [he, hf, Nat.mul_assoc, Nat.mul_left_comm, Nat.mul_comm]
state_before: a b c d e : Nat
he : b = a * e
f : Nat
hf : d = c * f
⊢ b * d = a * c * (e * f)
Theorem: MeasureTheory.DominatedFinMeasAdditive.eq_zero
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: simp only [Measure.coe_zero, Pi.zero_apply]
state_before: α : Type u_2
E : Type ?u.102358
F : Type ?u.102361
F' : Type ?u.102364
G : Type ?u.102367
𝕜 : Type ?u.102370
p : ℝ≥0∞
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
inst✝² : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ : Measure α
β✝ : Type ?u.102670
inst✝¹ : SeminormedAddCommGroup β✝
T✝ T' : Set α → β✝
C✝ C' : ℝ
β : Type u_1
inst✝ : NormedAddCommGroup β
T : Set α → β
C : ℝ
m : MeasurableSpace α
hT : DominatedFinMeasAdditive 0 T C
s : Set α
hs : MeasurableSet s
⊢ ↑↑0 s = 0
Theorem: Set.image_sub_const_Ico
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_neg_add]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x - a) '' Ico b c = Ico (b - a) (c - a)
Theorem: IsLocalization.exist_integer_multiples_of_finite
File: Mathlib/RingTheory/Localization/Integer.lean

tactic: cases nonempty_fintype ι
state_before: R : Type u_2
inst✝⁵ : CommRing R
M : Submonoid R
S : Type u_3
inst✝⁴ : CommRing S
inst✝³ : Algebra R S
P : Type ?u.28129
inst✝² : CommRing P
inst✝¹ : IsLocalization M S
ι : Type u_1
inst✝ : Finite ι
f : ι → S
⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)

tactic: obtain ⟨b, hb⟩ := exist_integer_multiples M Finset.univ f
state_before: case intro
R : Type u_2
inst✝⁵ : CommRing R
M : Submonoid R
S : Type u_3
inst✝⁴ : CommRing S
inst✝³ : Algebra R S
P : Type ?u.28129
inst✝² : CommRing P
inst✝¹ : IsLocalization M S
ι : Type u_1
inst✝ : Finite ι
f : ι → S
val✝ : Fintype ι
⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)

tactic: exact ⟨b, fun i => hb i (Finset.mem_univ _)⟩
state_before: case intro.intro
R : Type u_2
inst✝⁵ : CommRing R
M : Submonoid R
S : Type u_3
inst✝⁴ : CommRing S
inst✝³ : Algebra R S
P : Type ?u.28129
inst✝² : CommRing P
inst✝¹ : IsLocalization M S
ι : Type u_1
inst✝ : Finite ι
f : ι → S
val✝ : Fintype ι
b : { x // x ∈ M }
hb : ∀ (i : ι), i ∈ Finset.univ → IsInteger R (↑b • f i)
⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)
Theorem: Matrix.IsDiag.diagonal_diag
File: Mathlib/LinearAlgebra/Matrix/IsDiag.lean

tactic: obtain rfl | hij := Decidable.eq_or_ne i j
state_before: α : Type u_1
β : Type ?u.560
R : Type ?u.563
n : Type u_2
m : Type ?u.569
inst✝¹ : Zero α
inst✝ : DecidableEq n
A : Matrix n n α
h : IsDiag A
i j : n
⊢ diagonal (diag A) i j = A i j

tactic: rw [diagonal_apply_eq, diag]
state_before: case inl
α : Type u_1
β : Type ?u.560
R : Type ?u.563
n : Type u_2
m : Type ?u.569
inst✝¹ : Zero α
inst✝ : DecidableEq n
A : Matrix n n α
h : IsDiag A
i : n
⊢ diagonal (diag A) i i = A i i

tactic: rw [diagonal_apply_ne _ hij, h hij]
state_before: case inr
α : Type u_1
β : Type ?u.560
R : Type ?u.563
n : Type u_2
m : Type ?u.569
inst✝¹ : Zero α
inst✝ : DecidableEq n
A : Matrix n n α
h : IsDiag A
i j : n
hij : i ≠ j
⊢ diagonal (diag A) i j = A i j
Theorem: MeasureTheory.Measure.bind_zero_left
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: simp [bind]
state_before: α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → Measure β
⊢ bind 0 f = 0
Theorem: Encodable.iUnion_decode₂_disjoint_on
File: Mathlib/Logic/Encodable/Lattice.lean

tactic: rintro i j ij
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
⊢ Pairwise (Disjoint on fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b)

tactic: refine' disjoint_left.mpr fun x => _
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
i j : ℕ
ij : i ≠ j
⊢ (Disjoint on fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b) i j

tactic: suffices ∀ a, encode a = i → x ∈ f a → ∀ b, encode b = j → x ∉ f b by simpa [decode₂_eq_some]
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
i j : ℕ
ij : i ≠ j
x : α
⊢ x ∈ (fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b) i → ¬x ∈ (fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b) j

tactic: rintro a rfl ha b rfl hb
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
i j : ℕ
ij : i ≠ j
x : α
⊢ ∀ (a : β), encode a = i → x ∈ f a → ∀ (b : β), encode b = j → ¬x ∈ f b

tactic: exact (hd (mt (congr_arg encode) ij)).le_bot ⟨ha, hb⟩
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
x : α
a : β
ha : x ∈ f a
b : β
ij : encode a ≠ encode b
hb : x ∈ f b
⊢ False

tactic: simpa [decode₂_eq_some]
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable β
f : β → Set α
hd : Pairwise (Disjoint on f)
i j : ℕ
ij : i ≠ j
x : α
this : ∀ (a : β), encode a = i → x ∈ f a → ∀ (b : β), encode b = j → ¬x ∈ f b
⊢ x ∈ (fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b) i → ¬x ∈ (fun i => ⋃ (b : β) (_ : b ∈ decode₂ β i), f b) j
Theorem: Finmap.insert_toFinmap
File: Mathlib/Data/Finmap.lean

tactic: simp [insert]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
b : β a
s : AList β
⊢ insert a b ⟦s⟧ = ⟦AList.insert a b s⟧
Theorem: eq_mpr_bijective
File: Mathlib/Logic/Function/Basic.lean

tactic: cases h
state_before: α β : Sort u_1
h : α = β
⊢ Bijective (Eq.mpr h)

tactic: refine ⟨fun _ _ ↦ id, fun x ↦ ⟨x, rfl⟩⟩
state_before: case refl
α : Sort u_1
⊢ Bijective (Eq.mpr (_ : α = α))
Theorem: constantCoeff_wittStructureRat
File: Mathlib/RingTheory/WittVector/StructurePolynomial.lean

tactic: simp only [wittStructureRat, eval₂Hom_zero'_apply, h, bind₁, map_aeval, constantCoeff_rename,
  constantCoeff_wittPolynomial, constantCoeff_comp_algebraMap, RingHom.id_apply,
  constantCoeff_xInTermsOfW]
state_before: p : ℕ
R : Type ?u.1929960
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
h : ↑constantCoeff Φ = 0
n : ℕ
⊢ ↑constantCoeff (wittStructureRat p Φ n) = 0
Theorem: CharP.pow_prime_pow_mul_eq_one_iff
File: Mathlib/Algebra/CharP/Basic.lean

tactic: induction' k with k hk
state_before: R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p k m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
⊢ x ^ (p ^ k * m) = 1 ↔ x ^ m = 1

tactic: rw [pow_zero, one_mul]
state_before: case zero
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
⊢ x ^ (p ^ Nat.zero * m) = 1 ↔ x ^ m = 1

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: case succ
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
k : ℕ
hk : x ^ (p ^ k * m) = 1 ↔ x ^ m = 1
⊢ x ^ (p ^ Nat.succ k * m) = 1 ↔ x ^ m = 1

tactic: rw [pow_succ, mul_assoc, pow_mul', ← frobenius_def, ← frobenius_one p] at h
state_before: case succ.refine'_1
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
k : ℕ
hk : x ^ (p ^ k * m) = 1 ↔ x ^ m = 1
h : x ^ (p ^ Nat.succ k * m) = 1
⊢ x ^ m = 1

tactic: exact hk.1 (frobenius_inj R p h)
state_before: case succ.refine'_1
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
k : ℕ
hk : x ^ (p ^ k * m) = 1 ↔ x ^ m = 1
h✝ : ↑(frobenius R p) (x ^ (p ^ k * m)) = 1
h : ↑(frobenius R p) (x ^ (p ^ k * m)) = ↑(frobenius R p) 1
⊢ x ^ m = 1

tactic: rw [pow_mul', h, one_pow]
state_before: case succ.refine'_2
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsReduced R
p m : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP R p
x : R
k : ℕ
hk : x ^ (p ^ k * m) = 1 ↔ x ^ m = 1
h : x ^ m = 1
⊢ x ^ (p ^ Nat.succ k * m) = 1
Theorem: Matrix.left_inv_eq_left_inv
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: rw [← inv_eq_left_inv h, ← inv_eq_left_inv g]
state_before: l : Type ?u.259825
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B C : Matrix n n α
h : B ⬝ A = 1
g : C ⬝ A = 1
⊢ B = C
Theorem: Pretrivialization.preimage_symm_proj_baseSet
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: refine' inter_eq_right_iff_subset.mpr fun x hx => _
state_before: ι : Type ?u.9079
B : Type u_1
F : Type u_2
E : B → Type ?u.9090
Z : Type u_3
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x : Z
⊢ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' e.baseSet) ∩ e.target = e.target

tactic: simp only [mem_preimage, LocalEquiv.invFun_as_coe, e.proj_symm_apply hx]
state_before: ι : Type ?u.9079
B : Type u_1
F : Type u_2
E : B → Type ?u.9090
Z : Type u_3
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x ∈ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' e.baseSet)

tactic: exact e.mem_target.mp hx
state_before: ι : Type ?u.9079
B : Type u_1
F : Type u_2
E : B → Type ?u.9090
Z : Type u_3
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x.fst ∈ e.baseSet
Theorem: prevD_eq
File: Mathlib/Algebra/Homology/Homotopy.lean

tactic: obtain rfl := c.prev_eq' w
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
f : (i j : ι) → X C i ⟶ X D j
j j' : ι
w : ComplexShape.Rel c j' j
⊢ ↑(prevD j) f = f j j' ≫ d D j' j

tactic: rfl
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
f : (i j : ι) → X C i ⟶ X D j
j : ι
w : ComplexShape.Rel c (ComplexShape.prev c j) j
⊢ ↑(prevD j) f = f j (ComplexShape.prev c j) ≫ d D (ComplexShape.prev c j) j
Theorem: Polynomial.cyclotomic_three
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: simp [cyclotomic_prime, sum_range_succ']
state_before: R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 3 R = X ^ 2 + X + 1
Theorem: isClosed_induced_iff
File: Mathlib/Topology/Order.lean

tactic: letI := t.induced f
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.19398
t : TopologicalSpace β
s : Set α
f : α → β
⊢ IsClosed s ↔ ∃ t_1, IsClosed t_1 ∧ f ⁻¹' t_1 = s

tactic: simp only [← isOpen_compl_iff, isOpen_induced_iff]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.19398
t : TopologicalSpace β
s : Set α
f : α → β
this : TopologicalSpace α := TopologicalSpace.induced f t
⊢ IsClosed s ↔ ∃ t_1, IsClosed t_1 ∧ f ⁻¹' t_1 = s

tactic: exact compl_surjective.exists.trans (by simp only [preimage_compl, compl_inj_iff])
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.19398
t : TopologicalSpace β
s : Set α
f : α → β
this : TopologicalSpace α := TopologicalSpace.induced f t
⊢ (∃ t_1, IsOpen t_1 ∧ f ⁻¹' t_1 = sᶜ) ↔ ∃ t_1, IsOpen (t_1ᶜ) ∧ f ⁻¹' t_1 = s

tactic: simp only [preimage_compl, compl_inj_iff]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.19398
t : TopologicalSpace β
s : Set α
f : α → β
this : TopologicalSpace α := TopologicalSpace.induced f t
⊢ (∃ x, IsOpen (xᶜ) ∧ f ⁻¹' xᶜ = sᶜ) ↔ ∃ t_1, IsOpen (t_1ᶜ) ∧ f ⁻¹' t_1 = s
Theorem: Nat.coprime.coprime_div_left
File: Std/Data/Nat/Gcd.lean

tactic: match eq_zero_or_pos a with
| .inl h0 =>
  rw [h0] at dvd
  rw [Nat.eq_zero_of_zero_dvd dvd] at cmn ⊢
  simp; assumption
| .inr hpos =>
  let ⟨k, hk⟩ := dvd
  rw [hk, Nat.mul_div_cancel_left _ hpos]
  rw [hk] at cmn
  exact cmn.coprime_mul_left
state_before: m n a : Nat
cmn : coprime m n
dvd : a ∣ m
⊢ coprime (m / a) n

tactic: rw [h0] at dvd
state_before: m n a : Nat
cmn : coprime m n
dvd : a ∣ m
h0 : a = 0
⊢ coprime (m / a) n

tactic: rw [Nat.eq_zero_of_zero_dvd dvd] at cmn ⊢
state_before: m n a : Nat
cmn : coprime m n
dvd : 0 ∣ m
h0 : a = 0
⊢ coprime (m / a) n

tactic: simp
state_before: m n a : Nat
cmn : coprime 0 n
dvd : 0 ∣ m
h0 : a = 0
⊢ coprime (0 / a) n

tactic: assumption
state_before: m n a : Nat
cmn : coprime 0 n
dvd : 0 ∣ m
h0 : a = 0
⊢ coprime 0 n

tactic: let ⟨k, hk⟩ := dvd
state_before: m n a : Nat
cmn : coprime m n
dvd : a ∣ m
hpos : a > 0
⊢ coprime (m / a) n

tactic: rw [hk, Nat.mul_div_cancel_left _ hpos]
state_before: m n a : Nat
cmn : coprime m n
dvd : a ∣ m
hpos : a > 0
k : Nat
hk : m = a * k
⊢ coprime (m / a) n

tactic: rw [hk] at cmn
state_before: m n a : Nat
cmn : coprime m n
dvd : a ∣ m
hpos : a > 0
k : Nat
hk : m = a * k
⊢ coprime k n

tactic: exact cmn.coprime_mul_left
state_before: m n a : Nat
dvd : a ∣ m
hpos : a > 0
k : Nat
cmn : coprime (a * k) n
hk : m = a * k
⊢ coprime k n
Theorem: CategoryTheory.Subobject.finset_inf_factors
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: classical
induction' s using Finset.induction_on with _ _ _ ih
. simp [top_factors]
. simp [ih]
state_before: C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
s : Finset I
P : I → Subobject B
f : A ⟶ B
⊢ Factors (Finset.inf s P) f ↔ ∀ (i : I), i ∈ s → Factors (P i) f

tactic: induction' s using Finset.induction_on with _ _ _ ih
state_before: C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
s : Finset I
P : I → Subobject B
f : A ⟶ B
⊢ Factors (Finset.inf s P) f ↔ ∀ (i : I), i ∈ s → Factors (P i) f

tactic: . simp [top_factors]
state_before: case empty
C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
P : I → Subobject B
f : A ⟶ B
⊢ Factors (Finset.inf ∅ P) f ↔ ∀ (i : I), i ∈ ∅ → Factors (P i) f

case insert
C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
P : I → Subobject B
f : A ⟶ B
a✝¹ : I
s✝ : Finset I
a✝ : ¬a✝¹ ∈ s✝
ih : Factors (Finset.inf s✝ P) f ↔ ∀ (i : I), i ∈ s✝ → Factors (P i) f
⊢ Factors (Finset.inf (insert a✝¹ s✝) P) f ↔ ∀ (i : I), i ∈ insert a✝¹ s✝ → Factors (P i) f

tactic: . simp [ih]
state_before: case insert
C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
P : I → Subobject B
f : A ⟶ B
a✝¹ : I
s✝ : Finset I
a✝ : ¬a✝¹ ∈ s✝
ih : Factors (Finset.inf s✝ P) f ↔ ∀ (i : I), i ∈ s✝ → Factors (P i) f
⊢ Factors (Finset.inf (insert a✝¹ s✝) P) f ↔ ∀ (i : I), i ∈ insert a✝¹ s✝ → Factors (P i) f

tactic: simp [top_factors]
state_before: case empty
C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
P : I → Subobject B
f : A ⟶ B
⊢ Factors (Finset.inf ∅ P) f ↔ ∀ (i : I), i ∈ ∅ → Factors (P i) f

tactic: simp [ih]
state_before: case insert
C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasPullbacks C
I : Type u_1
A B : C
P : I → Subobject B
f : A ⟶ B
a✝¹ : I
s✝ : Finset I
a✝ : ¬a✝¹ ∈ s✝
ih : Factors (Finset.inf s✝ P) f ↔ ∀ (i : I), i ∈ s✝ → Factors (P i) f
⊢ Factors (Finset.inf (insert a✝¹ s✝) P) f ↔ ∀ (i : I), i ∈ insert a✝¹ s✝ → Factors (P i) f