Library Coq.Program.Basics
Standard functions and combinators.
Proofs about them require functional extensionality and can be found
in Combinators.
Author: Matthieu Sozeau
Institution: LRI, CNRS UMR 8623 - University Paris Sud
The polymorphic identity function is defined in Datatypes.
Function composition.
Definition compose {A B C} (g : B -> C) (f : A -> B) :=
fun x : A => g (f x).
#[global]
Hint Unfold compose : core.
Declare Scope program_scope.
Notation " g ∘ f " := (compose g f)
(at level 40, left associativity) : program_scope.
Local Open Scope program_scope.
The non-dependent function space between A and B.
Logical implication.
The constant function const a always returns a.
The flip combinator reverses the first two arguments of a function.
Application as a combinator.
Curryfication of prod is defined in Logic.Datatypes.