tasksource/leandojo huggingface dataset:
Theorem: SimpleGraph.isAcyclic_iff_forall_adj_isBridge
File: Mathlib/Combinatorics/SimpleGraph/Acyclic.lean

tactic: simp_rw [isBridge_iff_adj_and_forall_cycle_not_mem]
state_before: V : Type u
G : SimpleGraph V
⊢ IsAcyclic G ↔ ∀ ⦃v w : V⦄, Adj G v w → IsBridge G (Quotient.mk (Sym2.Rel.setoid V) (v, w))

tactic: constructor
state_before: V : Type u
G : SimpleGraph V
⊢ IsAcyclic G ↔
    ∀ ⦃v w : V⦄,
      Adj G v w →
        Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p

tactic: intro ha v w hvw
state_before: case mp
V : Type u
G : SimpleGraph V
⊢ IsAcyclic G →
    ∀ ⦃v w : V⦄,
      Adj G v w →
        Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p

tactic: apply And.intro hvw
state_before: case mp
V : Type u
G : SimpleGraph V
ha : IsAcyclic G
v w : V
hvw : Adj G v w
⊢ Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p

tactic: intro u p hp
state_before: case mp
V : Type u
G : SimpleGraph V
ha : IsAcyclic G
v w : V
hvw : Adj G v w
⊢ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p

tactic: cases ha p hp
state_before: case mp
V : Type u
G : SimpleGraph V
ha : IsAcyclic G
v w : V
hvw : Adj G v w
u : V
p : Walk G u u
hp : Walk.IsCycle p
⊢ ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p

tactic: rintro hb v (_ | ⟨ha, p⟩) hp
state_before: case mpr
V : Type u
G : SimpleGraph V
⊢ (∀ ⦃v w : V⦄,
      Adj G v w →
        Adj G v w ∧
          ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p) →
    IsAcyclic G

tactic: exact hp.not_of_nil
state_before: case mpr.nil
V : Type u
G : SimpleGraph V
hb :
  ∀ ⦃v w : V⦄,
    Adj G v w →
      Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p
v : V
hp : Walk.IsCycle Walk.nil
⊢ False

tactic: apply (hb ha).2 _ hp
state_before: case mpr.cons
V : Type u
G : SimpleGraph V
hb :
  ∀ ⦃v w : V⦄,
    Adj G v w →
      Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p
v v✝ : V
ha : Adj G v v✝
p : Walk G v✝ v
hp : Walk.IsCycle (Walk.cons ha p)
⊢ False

tactic: rw [Walk.edges_cons]
state_before: case mpr.cons
V : Type u
G : SimpleGraph V
hb :
  ∀ ⦃v w : V⦄,
    Adj G v w →
      Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p
v v✝ : V
ha : Adj G v v✝
p : Walk G v✝ v
hp : Walk.IsCycle (Walk.cons ha p)
⊢ Quotient.mk (Sym2.Rel.setoid V) (v, v✝) ∈ Walk.edges (Walk.cons ha p)

tactic: apply List.mem_cons_self
state_before: case mpr.cons
V : Type u
G : SimpleGraph V
hb :
  ∀ ⦃v w : V⦄,
    Adj G v w →
      Adj G v w ∧ ∀ ⦃u : V⦄ (p : Walk G u u), Walk.IsCycle p → ¬Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ Walk.edges p
v v✝ : V
ha : Adj G v v✝
p : Walk G v✝ v
hp : Walk.IsCycle (Walk.cons ha p)
⊢ Quotient.mk (Sym2.Rel.setoid V) (v, v✝) ∈ Quotient.mk (Sym2.Rel.setoid V) (v, v✝) :: Walk.edges p
Theorem: Padic.const_equiv
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: rw [heq]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
q r : ℚ
heq : q = r
⊢ const (padicNorm p) q ≈ const (padicNorm p) r
Theorem: Dense.exists_dist_lt
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: have : (ball x ε).Nonempty := by simp [hε]
state_before: α : Type u
β : Type v
X : Type ?u.155993
ι : Type ?u.155996
inst✝ : PseudoMetricSpace α
x✝ y z : α
δ ε✝ ε₁ ε₂ : ℝ
s✝ s : Set α
hs : Dense s
x : α
ε : ℝ
hε : 0 < ε
⊢ ∃ y, y ∈ s ∧ dist x y < ε

tactic: simpa only [mem_ball'] using hs.exists_mem_open isOpen_ball this
state_before: α : Type u
β : Type v
X : Type ?u.155993
ι : Type ?u.155996
inst✝ : PseudoMetricSpace α
x✝ y z : α
δ ε✝ ε₁ ε₂ : ℝ
s✝ s : Set α
hs : Dense s
x : α
ε : ℝ
hε : 0 < ε
this : Set.Nonempty (ball x ε)
⊢ ∃ y, y ∈ s ∧ dist x y < ε

tactic: simp [hε]
state_before: α : Type u
β : Type v
X : Type ?u.155993
ι : Type ?u.155996
inst✝ : PseudoMetricSpace α
x✝ y z : α
δ ε✝ ε₁ ε₂ : ℝ
s✝ s : Set α
hs : Dense s
x : α
ε : ℝ
hε : 0 < ε
⊢ Set.Nonempty (ball x ε)
Theorem: CategoryTheory.Limits.Cocone.ofCotrident_ι
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: cases j <;> aesop_cat
state_before: J : Type w
C : Type u
inst✝ : Category C
X Y : C
f : J → (X ⟶ Y)
F : WalkingParallelFamily J ⥤ C
t : Cotrident fun j => F.map (line j)
j : WalkingParallelFamily J
⊢ F.obj j = (parallelFamily fun j => F.map (line j)).obj j
Theorem: MulEquiv.prime_iff
File: Mathlib/Algebra/Associated.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.25765
δ : Type ?u.25768
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type ?u.25777
G : Type ?u.25780
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
e : α ≃* β
h : Prime p
a : β
⊢ ↑e (↑(symm e) a) = a

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.25765
δ : Type ?u.25768
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type ?u.25777
G : Type ?u.25780
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
e : α ≃* β
a : α
⊢ ↑(symm e) (↑e a) = a
Theorem: zero_pow'
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [pow_succ]
state_before: R : Type ?u.3804
S : Type ?u.3807
M : Type u_1
inst✝ : MonoidWithZero M
k : ℕ
x✝ : k + 1 ≠ 0
⊢ 0 ^ (k + 1) = 0

tactic: exact zero_mul _
state_before: R : Type ?u.3804
S : Type ?u.3807
M : Type u_1
inst✝ : MonoidWithZero M
k : ℕ
x✝ : k + 1 ≠ 0
⊢ 0 * 0 ^ k = 0
Theorem: Matrix.circulant_single_one
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

tactic: ext (i j)
state_before: α✝ : Type ?u.41028
β : Type ?u.41031
m : Type ?u.41034
n✝ : Type ?u.41037
R : Type ?u.41040
α : Type u_1
n : Type u_2
inst✝³ : Zero α
inst✝² : One α
inst✝¹ : DecidableEq n
inst✝ : AddGroup n
⊢ circulant (Pi.single 0 1) = 1

tactic: simp [one_apply, Pi.single_apply, sub_eq_zero]
state_before: case a.h
α✝ : Type ?u.41028
β : Type ?u.41031
m : Type ?u.41034
n✝ : Type ?u.41037
R : Type ?u.41040
α : Type u_1
n : Type u_2
inst✝³ : Zero α
inst✝² : One α
inst✝¹ : DecidableEq n
inst✝ : AddGroup n
i j : n
⊢ circulant (Pi.single 0 1) i j = OfNat.ofNat 1 i j
Theorem: List.mem_append_of_mem_right
File: src/lean/Init/Data/List/Basic.lean

tactic: intro h
state_before: α : Type u
β : Type v
γ : Type w
b : α
bs as : List α
⊢ b ∈ bs → b ∈ as ++ bs

tactic: induction as with
| nil  => simp [h]
| cons => apply Mem.tail; assumption
state_before: α : Type u
β : Type v
γ : Type w
b : α
bs as : List α
h : b ∈ bs
⊢ b ∈ as ++ bs

tactic: simp [h]
state_before: case nil
α : Type u
β : Type v
γ : Type w
b : α
bs : List α
h : b ∈ bs
⊢ b ∈ nil ++ bs

tactic: apply Mem.tail
state_before: case cons
α : Type u
β : Type v
γ : Type w
b : α
bs : List α
h : b ∈ bs
head✝ : α
tail✝ : List α
tail_ih✝ : b ∈ tail✝ ++ bs
⊢ b ∈ head✝ :: tail✝ ++ bs

tactic: assumption
state_before: case cons.a
α : Type u
β : Type v
γ : Type w
b : α
bs : List α
h : b ∈ bs
head✝ : α
tail✝ : List α
tail_ih✝ : b ∈ tail✝ ++ bs
⊢ Mem b (List.append tail✝ bs)
Theorem: PGame.moveLeft_neg_symm
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp
state_before: x : PGame
i : RightMoves (-x)
⊢ moveLeft x (↑toRightMovesNeg.symm i) = -moveRight (-x) i
Theorem: deriv.lhopital_zero_right_on_Ico
File: Mathlib/Analysis/Calculus/LHopital.lean

tactic: refine' lhopital_zero_right_on_Ioo hab hdf hg' _ _ hdiv
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hcf : ContinuousOn f (Ico a b)
hcg : ContinuousOn g (Ico a b)
hg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0
hfa : f a = 0
hga : g a = 0
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l
⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l

tactic: rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
state_before: case refine'_1
a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hcf : ContinuousOn f (Ico a b)
hcg : ContinuousOn g (Ico a b)
hg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0
hfa : f a = 0
hga : g a = 0
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l
⊢ Tendsto (fun x => f x) (𝓝[Ioi a] a) (𝓝 0)

tactic: exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
state_before: case refine'_1
a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hcf : ContinuousOn f (Ico a b)
hcg : ContinuousOn g (Ico a b)
hg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0
hfa : f a = 0
hga : g a = 0
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l
⊢ Tendsto (fun x => f x) (𝓝[Ioo a b] a) (𝓝 (f a))

tactic: rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
state_before: case refine'_2
a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hcf : ContinuousOn f (Ico a b)
hcg : ContinuousOn g (Ico a b)
hg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0
hfa : f a = 0
hga : g a = 0
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l
⊢ Tendsto (fun x => g x) (𝓝[Ioi a] a) (𝓝 0)

tactic: exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
state_before: case refine'_2
a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hcf : ContinuousOn f (Ico a b)
hcg : ContinuousOn g (Ico a b)
hg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0
hfa : f a = 0
hga : g a = 0
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l
⊢ Tendsto (fun x => g x) (𝓝[Ioo a b] a) (𝓝 (g a))
Theorem: ConvexCone.Flat.pointed
File: Mathlib/Analysis/Convex/Cone/Basic.lean

tactic: obtain ⟨x, hx, _, hxneg⟩ := hS
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.77348
G : Type ?u.77351
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
S✝ S : ConvexCone 𝕜 E
hS : Flat S
⊢ Pointed S

tactic: rw [Pointed, ← add_neg_self x]
state_before: case intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.77348
G : Type ?u.77351
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
S✝ S : ConvexCone 𝕜 E
x : E
hx : x ∈ S
left✝ : x ≠ 0
hxneg : -x ∈ S
⊢ Pointed S

tactic: exact add_mem S hx hxneg
state_before: case intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.77348
G : Type ?u.77351
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
S✝ S : ConvexCone 𝕜 E
x : E
hx : x ∈ S
left✝ : x ≠ 0
hxneg : -x ∈ S
⊢ x + -x ∈ S
Theorem: BoundedContinuousFunction.dist_lt_iff_of_compact
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: fconstructor
state_before: F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
⊢ dist f g < C ↔ ∀ (x : α), dist (↑f x) (↑g x) < C

tactic: intro w x
state_before: case mp
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
⊢ dist f g < C → ∀ (x : α), dist (↑f x) (↑g x) < C

tactic: exact lt_of_le_of_lt (dist_coe_le_dist x) w
state_before: case mp
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x✝ : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
w : dist f g < C
x : α
⊢ dist (↑f x) (↑g x) < C

tactic: by_cases h : Nonempty α
state_before: case mpr
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
⊢ (∀ (x : α), dist (↑f x) (↑g x) < C) → dist f g < C

tactic: exact dist_lt_of_nonempty_compact
state_before: case pos
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : Nonempty α
⊢ (∀ (x : α), dist (↑f x) (↑g x) < C) → dist f g < C

tactic: rintro -
state_before: case neg
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : ¬Nonempty α
⊢ (∀ (x : α), dist (↑f x) (↑g x) < C) → dist f g < C

tactic: convert C0
state_before: case neg
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : ¬Nonempty α
⊢ dist f g < C

tactic: apply le_antisymm _ dist_nonneg'
state_before: case h.e'_3
F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : ¬Nonempty α
⊢ dist f g = 0

tactic: rw [dist_eq]
state_before: F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : ¬Nonempty α
⊢ dist f g ≤ 0

tactic: exact csInf_le ⟨0, fun C => And.left⟩ ⟨le_rfl, fun x => False.elim (h (Nonempty.intro x))⟩
state_before: F : Type ?u.285808
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
C0 : 0 < C
h : ¬Nonempty α
⊢ sInf {C | 0 ≤ C ∧ ∀ (x : α), dist (↑f x) (↑g x) ≤ C} ≤ 0
Theorem: SimpleGraph.Iso.card_eq_of_iso
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: rw [← Fintype.ofEquiv_card f.toEquiv]
state_before: ι : Sort ?u.637529
𝕜 : Type ?u.637532
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
f✝ : G ≃g G'
inst✝¹ : Fintype V
inst✝ : Fintype W
f : G ≃g G'
⊢ Fintype.card V = Fintype.card W

tactic: apply @Fintype.card_congr' _ _ (_) (_) rfl
state_before: ι : Sort ?u.637529
𝕜 : Type ?u.637532
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
f✝ : G ≃g G'
inst✝¹ : Fintype V
inst✝ : Fintype W
f : G ≃g G'
⊢ Fintype.card W = Fintype.card W
Theorem: Finset.sum_int_mod
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [Finset.sum, Multiset.map_map]
state_before: ι : Type ?u.877325
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
s : Finset α
n : ℤ
f : α → ℤ
⊢ Multiset.sum (Multiset.map (fun x => x % n) (Multiset.map (fun i => f i) s.val)) % n = (∑ i in s, f i % n) % n

tactic: rfl
state_before: ι : Type ?u.877325
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
s : Finset α
n : ℤ
f : α → ℤ
⊢ Multiset.sum (Multiset.map ((fun x => x % n) ∘ fun i => f i) s.val) % n =
    Multiset.sum (Multiset.map (fun i => f i % n) s.val) % n
Theorem: Nat.lcm_self
File: Std/Data/Nat/Gcd.lean

tactic: match eq_zero_or_pos m with
| .inl h => rw [h, lcm_zero_left]
| .inr h => simp [lcm, Nat.mul_div_cancel _ h]
state_before: m : Nat
⊢ lcm m m = m

tactic: rw [h, lcm_zero_left]
state_before: m : Nat
h : m = 0
⊢ lcm m m = m

tactic: simp [lcm, Nat.mul_div_cancel _ h]
state_before: m : Nat
h : m > 0
⊢ lcm m m = m
Theorem: MeasureTheory.Measure.bind_dirac
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: ext1 s hs
state_before: α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → Measure β
hf : Measurable f
a : α
⊢ bind (dirac a) f = f a

tactic: erw [bind_apply hs hf, lintegral_dirac' a ((measurable_coe hs).comp hf)]
state_before: case h
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → Measure β
hf : Measurable f
a : α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(bind (dirac a) f) s = ↑↑(f a) s

tactic: rfl
state_before: case h
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → Measure β
hf : Measurable f
a : α
s : Set β
hs : MeasurableSet s
⊢ ((fun μ => ↑↑μ s) ∘ f) a = ↑↑(f a) s
Theorem: hasSum_ite_eq
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: convert @hasSum_single _ _ _ _ (fun b' => if b' = b then a else 0) b (fun b' hb' => if_neg hb')
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.41040
δ : Type ?u.41043
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f g : β → α
a✝ b✝ : α
s : Finset β
b : β
inst✝ : DecidablePred fun x => x = b
a : α
⊢ HasSum (fun b' => if b' = b then a else 0) a

tactic: exact (if_pos rfl).symm
state_before: case h.e'_6
α : Type u_2
β : Type u_1
γ : Type ?u.41040
δ : Type ?u.41043
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f g : β → α
a✝ b✝ : α
s : Finset β
b : β
inst✝ : DecidablePred fun x => x = b
a : α
⊢ a = if b = b then a else 0
Theorem: UniformCauchySeqOn.comp
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf⊢
state_before: α : Type u
β : Type v
γ✝ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g✝ : ι → α
γ : Type u_1
hf : UniformCauchySeqOn F p s
g : γ → α
⊢ UniformCauchySeqOn (fun n => F n ∘ g) p (g ⁻¹' s)

tactic: simpa only [UniformCauchySeqOn, comap_principal] using hf.comp g
state_before: α : Type u
β : Type v
γ✝ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g✝ : ι → α
γ : Type u_1
hf : UniformCauchySeqOnFilter F p (𝓟 s)
g : γ → α
⊢ UniformCauchySeqOnFilter (fun n => F n ∘ g) p (𝓟 (g ⁻¹' s))
Theorem: Primrec.list_head?
File: Mathlib/Computability/Primrec.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
β : Type ?u.248636
γ : Type ?u.248639
σ : Type ?u.248642
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
l : List α
⊢ (List.casesOn (id l) none fun b l_1 => some (l, b, l_1).snd.fst) = List.head? l
Theorem: InnerProductSpace.Core.cauchy_schwarz_aux
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← @ofReal_inj 𝕜, ofReal_normSq_eq_inner_self]
state_before: 𝕜 : Type u_1
E : Type ?u.645181
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ normSq (inner x y • x - inner x x • y) = normSq x * (normSq x * normSq y - ‖inner x y‖ ^ 2)

tactic: simp only [inner_sub_sub_self, inner_smul_left, inner_smul_right, conj_ofReal, mul_sub, ←
  ofReal_normSq_eq_inner_self x, ← ofReal_normSq_eq_inner_self y]
state_before: 𝕜 : Type u_1
E : Type ?u.645181
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ inner (inner x y • x - inner x x • y) (inner x y • x - inner x x • y) =
    ↑(normSq x * (normSq x * normSq y - ‖inner x y‖ ^ 2))

tactic: rw [← mul_assoc, mul_conj, IsROrC.conj_mul, normSq_eq_def', mul_left_comm, ← inner_conj_symm y,
  mul_conj, normSq_eq_def']
state_before: 𝕜 : Type u_1
E : Type ?u.645181
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ inner x y * (↑(starRingEnd 𝕜) (inner x y) * ↑(normSq x)) - ↑(normSq x) * (↑(starRingEnd 𝕜) (inner x y) * inner x y) -
        inner x y * (↑(normSq x) * inner y x) +
      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =
    ↑(normSq x * (normSq x * normSq y) - normSq x * ‖inner x y‖ ^ 2)

tactic: push_cast
state_before: 𝕜 : Type u_1
E : Type ?u.645181
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ ↑(‖inner x y‖ ^ 2) * ↑(normSq x) - ↑(normSq x) * ↑(‖inner x y‖ ^ 2) - ↑(normSq x) * ↑(‖inner x y‖ ^ 2) +
      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =
    ↑(normSq x * (normSq x * normSq y) - normSq x * ‖inner x y‖ ^ 2)

tactic: ring
state_before: 𝕜 : Type u_1
E : Type ?u.645181
F : Type u_2
inst✝² : IsROrC 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x y : F
⊢ ↑‖inner x y‖ ^ 2 * ↑(normSq x) - ↑(normSq x) * ↑‖inner x y‖ ^ 2 - ↑(normSq x) * ↑‖inner x y‖ ^ 2 +
      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =
    ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) - ↑(normSq x) * ↑‖inner x y‖ ^ 2
Theorem: QuadraticForm.discr_comp
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [Matrix.det_transpose, mul_left_comm, QuadraticForm.toMatrix'_comp, mul_comm,
  Matrix.det_mul, discr]
state_before: S : Type ?u.617859
R : Type ?u.617862
R₁ : Type u_1
M : Type ?u.617868
n : Type w
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R₁
inst✝³ : DecidableEq n
inst✝² : Invertible 2
m : Type w
inst✝¹ : DecidableEq m
inst✝ : Fintype m
Q : QuadraticForm R₁ (n → R₁)
f : (n → R₁) →ₗ[R₁] n → R₁
⊢ discr (comp Q f) = det (↑LinearMap.toMatrix' f) * det (↑LinearMap.toMatrix' f) * discr Q
Theorem: IsPGroup.index
File: Mathlib/GroupTheory/PGroup.lean

tactic: haveI := H.normalCore.fintypeQuotientOfFiniteIndex
state_before: p : ℕ
G : Type u_1
inst✝¹ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
H : Subgroup G
inst✝ : Subgroup.FiniteIndex H
⊢ ∃ n, Subgroup.index H = p ^ n

tactic: obtain ⟨n, hn⟩ := iff_card.mp (hG.to_quotient H.normalCore)
state_before: p : ℕ
G : Type u_1
inst✝¹ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
H : Subgroup G
inst✝ : Subgroup.FiniteIndex H
this : Fintype (G ⧸ Subgroup.normalCore H)
⊢ ∃ n, Subgroup.index H = p ^ n

tactic: obtain ⟨k, _, hk2⟩ :=
  (Nat.dvd_prime_pow hp.out).mp
    ((congr_arg _ (H.normalCore.index_eq_card.trans hn)).mp
      (Subgroup.index_dvd_of_le H.normalCore_le))
state_before: case intro
p : ℕ
G : Type u_1
inst✝¹ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
H : Subgroup G
inst✝ : Subgroup.FiniteIndex H
this : Fintype (G ⧸ Subgroup.normalCore H)
n : ℕ
hn : card (G ⧸ Subgroup.normalCore H) = p ^ n
⊢ ∃ n, Subgroup.index H = p ^ n

tactic: exact ⟨k, hk2⟩
state_before: case intro.intro.intro
p : ℕ
G : Type u_1
inst✝¹ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
H : Subgroup G
inst✝ : Subgroup.FiniteIndex H
this : Fintype (G ⧸ Subgroup.normalCore H)
n : ℕ
hn : card (G ⧸ Subgroup.normalCore H) = p ^ n
k : ℕ
left✝ : k ≤ n
hk2 : Subgroup.index H = p ^ k
⊢ ∃ n, Subgroup.index H = p ^ n
Theorem: PowerSeries.rescale_injective
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: intro p q h
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
⊢ Function.Injective ↑(rescale a)

tactic: rw [PowerSeries.ext_iff] at *
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h : ↑(rescale a) p = ↑(rescale a) q
⊢ p = q

tactic: intro n
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
h : ∀ (n : ℕ), ↑(coeff R n) (↑(rescale a) p) = ↑(coeff R n) (↑(rescale a) q)
⊢ ∀ (n : ℕ), ↑(coeff R n) p = ↑(coeff R n) q

tactic: specialize h n
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
h : ∀ (n : ℕ), ↑(coeff R n) (↑(rescale a) p) = ↑(coeff R n) (↑(rescale a) q)
n : ℕ
⊢ ↑(coeff R n) p = ↑(coeff R n) q

tactic: rw [coeff_rescale, coeff_rescale, mul_eq_mul_left_iff] at h
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
n : ℕ
h : ↑(coeff R n) (↑(rescale a) p) = ↑(coeff R n) (↑(rescale a) q)
⊢ ↑(coeff R n) p = ↑(coeff R n) q

tactic: apply h.resolve_right
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
n : ℕ
h : ↑(coeff R n) p = ↑(coeff R n) q ∨ a ^ n = 0
⊢ ↑(coeff R n) p = ↑(coeff R n) q

tactic: intro h'
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
n : ℕ
h : ↑(coeff R n) p = ↑(coeff R n) q ∨ a ^ n = 0
⊢ ¬a ^ n = 0

tactic: exact ha (pow_eq_zero h')
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
a : R
ha : a ≠ 0
p q : PowerSeries R
h✝ : ↑(rescale a) p = ↑(rescale a) q
n : ℕ
h : ↑(coeff R n) p = ↑(coeff R n) q ∨ a ^ n = 0
h' : a ^ n = 0
⊢ False