Skip to content

Commit 1143bc9

Browse files
uncomment some working code
1 parent 0f5b3fc commit 1143bc9

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Cubical/HITs/CauchyReals/Derivative.agda

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ open import Cubical.Data.Sigma
1414

1515
open import Cubical.HITs.PropositionalTruncation as PT
1616
open import Cubical.Data.NatPlusOne
17-
17+
open import Cubical.Data.Nat as ℕ hiding (_·_;_+_)
1818

1919
open import Cubical.Data.Rationals as ℚ using (ℚ ; [_/_])
2020
open import Cubical.Data.Rationals.Order as ℚ using
@@ -354,23 +354,23 @@ C·Derivative' C x f f'x F =
354354
-- → IsContinuous f
355355
-- hasDer→isCont f f' df ε = {!df!}
356356

357-
-- -- derivative-^ⁿ : ∀ n x →
358-
-- -- derivativeOf (_^ⁿ (suc n)) at x
359-
-- -- is (fromNat (suc n) ·ᵣ (x ^ⁿ n))
360-
-- -- derivative-^ⁿ zero x =
361-
-- -- substDer₂
362-
-- -- (λ _ → sym (·IdL _))
363-
-- -- (sym (·IdL _))
364-
-- -- (idDerivative x)
365-
-- -- derivative-^ⁿ (suc n) x =
366-
-- -- substDer₂ (λ _ → refl)
367-
-- -- (+ᵣComm _ _ ∙ cong₂ _+ᵣ_
368-
-- -- (·ᵣComm _ _) (sym (·ᵣAssoc _ _ _)) ∙
369-
-- -- sym (·DistR+ _ _ _) ∙
370-
-- -- cong (_·ᵣ ((x ^ⁿ n) ·ᵣ idfun ℝ x))
371-
-- -- (cong rat (ℚ.ℕ+→ℚ+ _ _)))
372-
-- -- (·Derivative _ _ _ _ _ IsContinuousId
373-
-- -- (derivative-^ⁿ n x) (idDerivative x))
357+
derivative-^ⁿ : n x
358+
derivativeOf (_^ⁿ (suc n)) at x
359+
is (fromNat (suc n) ·ᵣ (x ^ⁿ n))
360+
derivative-^ⁿ zero x =
361+
substDer₂
362+
(λ _ sym (·IdL _))
363+
(sym (·IdL _))
364+
(idDerivative x)
365+
derivative-^ⁿ (suc n) x =
366+
substDer₂ (λ _ refl)
367+
(+ᵣComm _ _ ∙ cong₂ _+ᵣ_
368+
(·ᵣComm _ _) (sym (·ᵣAssoc _ _ _)) ∙
369+
sym (·DistR+ _ _ _) ∙
370+
cong (_·ᵣ ((x ^ⁿ n) ·ᵣ idfun ℝ x))
371+
(cong rat (ℚ.ℕ+→ℚ+ _ _)))
372+
(·Derivative _ _ _ _ _ IsContinuousId
373+
(derivative-^ⁿ n x) (idDerivative x))
374374

375375
-- -- -- chainRule : ∀ x f f'gx g g'x
376376
-- -- -- → derivativeOf g at x is g'x

0 commit comments

Comments
 (0)