l3lab/ntp-mathlib huggingface dataset:
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      

Proof state:
case a
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α β γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
F2 : Functor F
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
⊢ ∀ (α β : Type u) (f : α → β) (x : F α), f <$> x = f <$> x

Next tactic:
intros
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      

Proof state:
case a
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α β γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
F2 : Functor F
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
α✝ β✝ : Type u
f✝ : α✝ → β✝
x✝ : F α✝
⊢ f✝ <$> x✝ = f✝ <$> x✝

Next tactic:
exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
    

Proof state:
case mk.mk
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α β γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
⊢ mk = mk

Next tactic:
congr
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
    congr <;> 

Proof state:
case mk.mk.e_toSeqLeft.e_seqLeft
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α β γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
⊢ sl1 = sl2

Next tactic:
funext α β x y
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
    congr <;> 

Proof state:
case mk.mk.e_toSeqRight.e_seqRight
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α β γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
⊢ sr1 = sr2

Next tactic:
funext α β x y
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
    congr <;> funext α β x y
    · 

Proof state:
case mk.mk.e_toSeqLeft.e_seqLeft.h.h.h.h
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α✝ β✝ γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
α β : Type u
x : F α
y : Unit → F β
⊢ sl1 x y = sl2 x y

Next tactic:
exact (seqLeft_eq1 _ (y Unit.unit)).trans (seqLeft_eq2 _ _).symm
theorem Applicative.ext {F} :
    ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2],
      (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) →
      (∀ {α β : Type u} (f : F (α → β)) (x : F α),
          @Seq.seq _ A1.toSeq _ _ f (fun _ => x) = @Seq.seq _ A2.toSeq _ _ f (fun _ => x)) →
      A1 = A2
  | { toFunctor := F1, seq := s1, pure := p1, seqLeft := sl1, seqRight := sr1 },
    { toFunctor := F2, seq := s2, pure := p2, seqLeft := sl2, seqRight := sr2 },
    L1, L2, H1, H2 => by
    obtain rfl : @p1 = @p2 := by
      funext α x
      apply H1
    obtain rfl : @s1 = @s2 := by
      funext α β f x
      exact H2 f (x Unit.unit)
    obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1
    obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2
    obtain rfl : F1 = F2 := by
      apply Functor.ext
      intros
      exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)
    congr <;> funext α β x y
    · exact (seqLeft_eq1 _ (y Unit.unit)).trans (seqLeft_eq2 _ _).symm
    · 

Proof state:
case mk.mk.e_toSeqRight.e_seqRight.h.h.h.h
F✝ : Type u → Type v
inst✝¹ : Applicative F✝
inst✝ : LawfulApplicative F✝
α✝ β✝ γ σ : Type u
F : Type u → Type u_1
F1 : Functor F
p1 : {α : Type u} → α → F α
s1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β
sl1 : {α β : Type u} → F α → (Unit → F β) → F α
sr1 : {α β : Type u} → F α → (Unit → F β) → F β
sl2 : {α β : Type u} → F α → (Unit → F β) → F α
sr2 : {α β : Type u} → F α → (Unit → F β) → F β
toLawfulFunctor✝¹ : LawfulFunctor F
seqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq1 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝¹ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
H1 : ∀ {α : Type u} (x : α), pure x = pure x
H2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x
toLawfulFunctor✝ : LawfulFunctor F
seqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y
seqRight_eq2 :
  ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y
pure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x
seq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g
seq_assoc✝ :
  ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x
α β : Type u
x : F α
y : Unit → F β
⊢ sr1 x y = sr2 x y

Next tactic:
exact (seqRight_eq1 _ (y Unit.unit)).trans (seqRight_eq2 _ (y Unit.unit)).symm
instance : CommApplicative Id := by 

Proof state:
⊢ CommApplicative Id

Next tactic:
refine' { .. }
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_1
⊢ ∀ {α β : Type ?u.5436}, Functor.mapConst = Functor.map ∘ Function.const β

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_2
⊢ ∀ {α : Type ?u.5436} (x : Id α), id <$> x = x

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_3
⊢ ∀ {α β γ : Type ?u.5436} (g : α → β) (h : β → γ) (x : Id α), (h ∘ g) <$> x = h <$> g <$> x

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_4
⊢ ∀ {α β : Type ?u.5436} (x : Id α) (y : Id β),
    (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_5
⊢ ∀ {α β : Type ?u.5436} (x : Id α) (y : Id β),
    (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_6
⊢ ∀ {α β : Type ?u.5436} (g : α → β) (x : Id α), (Seq.seq (pure g) fun x_1 => x) = g <$> x

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_7
⊢ ∀ {α β : Type ?u.5436} (g : α → β) (x : α), g <$> pure x = pure (g x)

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_8
⊢ ∀ {α β : Type ?u.5436} (g : Id (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_9
⊢ ∀ {α β γ : Type ?u.5436} (x : Id α) (g : Id (α → β)) (h : Id (β → γ)),
    (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (Function.comp <$> h) fun x => g) fun x_1 => x

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> 

Proof state:
case refine'_10
⊢ ∀ {α β : Type ?u.5436} (a : Id α) (b : Id β),
    (Seq.seq (Prod.mk <$> a) fun x => b) = Seq.seq ((fun b a => (a, b)) <$> b) fun x => a

Next tactic:
intros
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_1
α✝ β✝ : Type ?u.5436
⊢ Functor.mapConst = Functor.map ∘ Function.const β✝

Next tactic:
rfl
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_2
α✝ : Type ?u.5436
x✝ : Id α✝
⊢ id <$> x✝ = x✝

Next tactic:
rfl
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_3
α✝ β✝ γ✝ : Type ?u.5436
g✝ : α✝ → β✝
h✝ : β✝ → γ✝
x✝ : Id α✝
⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝

Next tactic:
rfl
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_4
α✝ β✝ : Type ?u.5436
x✝ : Id α✝
y✝ : Id β✝
⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝

Next tactic:
rfl
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_5
α✝ β✝ : Type ?u.5436
x✝ : Id α✝
y✝ : Id β✝
⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝

Next tactic:
rfl
instance : CommApplicative Id := by refine' { .. } <;> intros <;> 

Proof state:
case refine'_6
α✝ β✝ : Type ?u.5436
g✝ : α✝ → β✝
x✝ : Id α✝
⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝

Next tactic:
rfl