Skip to content

Commit

Permalink
[ funext ] Add a proof for funext variants with the other quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
buzden authored and gallais committed May 19, 2024
1 parent 2a3f031 commit cf68e99
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELO

* Removed need for the runtime value of the implicit argument in `succNotLTEpred`.

* Added `funExt0` and `funExt1`, functions analogous to `funExt` but for functions
with quantities 0 and 1 respectively.

#### Contrib

* `Data.List.Lazy` was moved from `contrib` to `base`.
Expand Down
8 changes: 8 additions & 0 deletions libs/base/Control/Function/FunExt.idr
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ module Control.Function.FunExt
public export
interface FunExt where
funExt : {0 b : a -> Type} -> {0 f, g : (x : a) -> b x} -> ((x : a) -> f x = g x) -> f = g

export
funExt0 : FunExt => {0 b : a -> Type} -> {0 f, g : (0 x : a) -> b x} -> ((x : a) -> f x = g x) -> f = g
funExt0 prf = rewrite funExt {f = \x => f x} {g = \y => g y} prf in Refl

export
funExt1 : FunExt => {0 b : a -> Type} -> {0 f, g : (1 x : a) -> b x} -> ((x : a) -> f x = g x) -> f = g
funExt1 prf = rewrite funExt {f = \x => f x} {g = \y => g y} prf in Refl

0 comments on commit cf68e99

Please sign in to comment.