function
本頁內容尚未翻譯。
idApply
Section titled “idApply”def idApply {A : Type} (a : A) : id a ≡ aApplying the identity function is a no-op: id a = a.
idApplyFn
Section titled “idApplyFn”def idApplyFn {A B : Type} (f : A -> B) : (fun (x : A) => id (f x)) ≡ fPost-composing a function with id gives back the function: (fun x => id (f x)) = f.
composeApply
Section titled “composeApply”def composeApply {A B C : Type} (g : B -> C) (f : A -> B) (x : A) : compose g f x ≡ g (f x)Composition unfolds pointwise: (g ∘ f) x = g (f x).
composeAssocFn
Section titled “composeAssocFn”def composeAssocFn {A B C D : Type} (h : C -> D) (g : B -> C) (f : A -> B) : compose h (compose g f) ≡ compose (compose h g) fFunction composition is associative: h ∘ (g ∘ f) = (h ∘ g) ∘ f.
composeIdLeft
Section titled “composeIdLeft”def composeIdLeft {A B : Type} (f : A -> B) : compose (fun (x : B) => x) f ≡ fThe identity function is a left unit for composition: id ∘ f = f.
composeIdRight
Section titled “composeIdRight”def composeIdRight {A B : Type} (f : A -> B) : compose f (fun (x : A) => x) ≡ fThe identity function is a right unit for composition: f ∘ id = f.
flipApply
Section titled “flipApply”def flipApply {A B C : Type} (f : A -> B -> C) (a : A) (b : B) : flip f b a ≡ f a bFlip swaps the two arguments: flip f b a = f a b.
flipFlip
Section titled “flipFlip”def flipFlip {A B C : Type} (f : A -> B -> C) : (fun (a : A) => fun (b : B) => flip f b a) ≡ fFlipping a function twice gives back the original function.
constApply
Section titled “constApply”def constApply {A B : Type} (a : A) (b : B) : const a b ≡ aA constant function ignores its argument: const a b = a.
constComposeLeft
Section titled “constComposeLeft”def constComposeLeft {A B C : Type} (c : C) (f : A -> B) : compose (fun (x : B) => c) f ≡ (fun (x : A) => c)Composing a constant function after any f is still constant: (fun _ => c) ∘ f = fun _ => c.
constComposeRight
Section titled “constComposeRight”def constComposeRight {A B C : Type} (g : B -> C) (b : B) : compose g (fun (x : A) => b) ≡ (fun (x : A) => g b)Composing g after a constant function is constant at g b: g ∘ (fun _ => b) = fun _ => g b.
applyFn
Section titled “applyFn”def applyFn {A B : Type} (f : A -> B) (x : A) : apply f x ≡ f xFunction application via apply agrees with direct application: apply f x = f x.
applyId
Section titled “applyId”def applyId {A : Type} (x : A) : apply (fun (a : A) => a) x ≡ xApplying the identity function through apply returns the argument: apply id x = x.
isInjective
Section titled “isInjective”def isInjective (A : Type) (B : Type) (f : A -> B) : TypeThe proposition that f is injective: equal images imply equal inputs.
isSurjective
Section titled “isSurjective”def isSurjective (A : Type) (B : Type) (f : A -> B) : TypeThe type saying f is surjective: every b in the codomain has a chosen preimage a with f a = b.
isBijective
Section titled “isBijective”def isBijective (A : Type) (B : Type) (f : A -> B) : TypeThe type saying f is bijective: both injective and surjective.
hasSection
Section titled “hasSection”def hasSection (A : Type) (B : Type) (f : A -> B) : TypeA section (right inverse) of f: a map s with f (s b) = b for all b.
hasRetraction
Section titled “hasRetraction”def hasRetraction (A : Type) (B : Type) (f : A -> B) : TypeA retraction (left inverse) of f: a map r with r (f a) = a for all a.
def isIso (A : Type) (B : Type) (f : A -> B) : TypeA two-sided inverse of f: a map g with f (g b) = b and g (f a) = a.
idInjective
Section titled “idInjective”def idInjective (A : Type) : isInjective A A (fun (x : A) => x)The identity function is injective.
idSurjective
Section titled “idSurjective”def idSurjective (A : Type) : isSurjective A A (fun (x : A) => x)The identity function is surjective.
idBijective
Section titled “idBijective”def idBijective (A : Type) : isBijective A A (fun (x : A) => x)The identity function is bijective.
idHasSection
Section titled “idHasSection”def idHasSection (A : Type) : hasSection A A (fun (x : A) => x)The identity function is its own section.
idHasRetraction
Section titled “idHasRetraction”def idHasRetraction (A : Type) : hasRetraction A A (fun (x : A) => x)The identity function is its own retraction.
idIsIso
Section titled “idIsIso”def idIsIso (A : Type) : isIso A A (fun (x : A) => x)The identity function is an isomorphism, with itself as inverse.
funExtImpl
Section titled “funExtImpl”def funExtImpl {A B : Type} {f g : A -> B} (h : (x : A) -> f x ≡ g x) : f ≡ gFunction extensionality: functions that agree pointwise are equal as paths.
happlyImpl
Section titled “happlyImpl”def happlyImpl {A B : Type} {f g : A -> B} (p : f ≡ g) (x : A) : f x ≡ g xTurns a path between functions into pointwise paths: f = g implies f x = g x.
happlyDep
Section titled “happlyDep”def happlyDep {A : Type} {B : A -> Type} {f g : (x : A) -> B x} (p : f ≡ g) (x : A) : f x ≡ g xPointwise paths from a path between dependent functions: f = g implies f x = g x.
compose_injective
Section titled “compose_injective”def compose_injective (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gInj : isInjective B C g) (fInj : isInjective A B f) : isInjective A C (compose g f)The composite of two injective functions is injective.
compose_surjective
Section titled “compose_surjective”def compose_surjective (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gSurj : isSurjective B C g) (fSurj : isSurjective A B f) : isSurjective A C (compose g f)The composite of two surjective functions is surjective.
compose_bijective
Section titled “compose_bijective”def compose_bijective (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gBij : isBijective B C g) (fBij : isBijective A B f) : isBijective A C (compose g f)The composite of two bijective functions is bijective.
fibIdCenter
Section titled “fibIdCenter”def fibIdCenter (A : Type) (b : A) : fiber A A (fun (x : A) => x) bThe canonical element of the fiber of the identity function over b, namely b itself.
fibConstElem
Section titled “fibConstElem”def fibConstElem (A : Type) (B : Type) (a : A) (x : B) : fiber B A (fun (b : B) => a) aEvery x gives an element of the fiber of the constant function at a over a.
precomp
Section titled “precomp”def precomp {A B C : Type} (f : A -> B) : (B -> C) -> (A -> C)Precomposition with f: sends g to g ∘ f.
postcomp
Section titled “postcomp”def postcomp {A B C : Type} (g : B -> C) : (A -> B) -> (A -> C)Postcomposition with g: sends f to g ∘ f.
precompIdApply
Section titled “precompIdApply”def precompIdApply (A : Type) (C : Type) (g : A -> C) (x : A) : precomp (fun (a : A) => a) g x ≡ g xPrecomposing with the identity leaves a function unchanged at every point.
postcompIdApply
Section titled “postcompIdApply”def postcompIdApply (A : Type) (B : Type) (f : A -> B) (x : A) : postcomp (fun (b : B) => b) f x ≡ f xPostcomposing with the identity leaves a function unchanged at every point.
curryApplyNd
Section titled “curryApplyNd”def curryApplyNd {A B C : Type} (f : ((x : A) × B) -> C) (a : A) (b : B) : curry f a b ≡ f (a, b)Currying computes as expected on non-dependent pairs: curry f a b = f (a, b).
uncurryApplyNd
Section titled “uncurryApplyNd”def uncurryApplyNd {A B C : Type} (f : A -> B -> C) (a : A) (b : B) : uncurry f (a, b) ≡ f a bUncurrying computes as expected: uncurry f (a, b) = f a b.
curryUncurryNd
Section titled “curryUncurryNd”def curryUncurryNd {A B C : Type} (f : A -> B -> C) : (fun (a : A) => fun (b : B) => curry (uncurry f) a b) ≡ fCurrying after uncurrying gives back the original two-argument function.
constEq
Section titled “constEq”def constEq {A B : Type} (a : A) (b1 b2 : B) : const a b1 ≡ const a b2A constant function returns the same value for any two arguments.
constFunExt
Section titled “constFunExt”def constFunExt {A B : Type} (a : A) : (fun (b : B) => const a b) ≡ (fun (b : B) => a)The function fun b => const a b equals the constant function fun _ => a.
flipConstFn
Section titled “flipConstFn”def flipConstFn {A B : Type} : flip (fun (a : A) => fun (b : B) => a) ≡ (fun (b : B) => fun (a : A) => a)Flipping the first projection gives the second projection: flip (fun a b => a) = fun b a => a.
section_to_surjective
Section titled “section_to_surjective”def section_to_surjective (A : Type) (B : Type) (f : A -> B) (sec : hasSection A B f) : isSurjective A B fA function with a section is surjective.
retraction_to_injective
Section titled “retraction_to_injective”def retraction_to_injective (A : Type) (B : Type) (f : A -> B) (ret : hasRetraction A B f) : isInjective A B fA function with a retraction is injective.
iso_to_bijective
Section titled “iso_to_bijective”def iso_to_bijective (A : Type) (B : Type) (f : A -> B) (iso : isIso A B f) : isBijective A B fA function with a two-sided inverse is bijective.
hasSection_compose
Section titled “hasSection_compose”def hasSection_compose (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gs : hasSection B C g) (fs : hasSection A B f) : hasSection A C (compose g f)Sections compose: if g and f have sections, so does g ∘ f.
hasRetraction_compose
Section titled “hasRetraction_compose”def hasRetraction_compose (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gr : hasRetraction B C g) (fr : hasRetraction A B f) : hasRetraction A C (compose g f)Retractions compose: if g and f have retractions, so does g ∘ f.
depApply
Section titled “depApply”def depApply {A : Type} {B : A -> Type} {C : A -> Type} (g : (x : A) -> B x -> C x) (f : (x : A) -> B x) (x : A) : C xPointwise application of a dependent family of functions g to a dependent function f: x maps to g x (f x).
depConst
Section titled “depConst”def depConst {A : Type} {B : A -> Type} (f : (x : A) -> B x) : (x : A) -> B xThe identity on dependent functions: returns f unchanged.
congIdFn
Section titled “congIdFn”def congIdFn {A : Type} {a b : A} (p : a ≡ b) : cong (fun (x : A) => x) p ≡ pApplying the identity function to a path with cong gives back the same path.
compose3
Section titled “compose3”def compose3 {A B C D : Type} (h : C -> D) (g : B -> C) (f : A -> B) : A -> DComposition of three functions: h ∘ g ∘ f.
compose4
Section titled “compose4”def compose4 {A B C D E : Type} (k : D -> E) (h : C -> D) (g : B -> C) (f : A -> B) : A -> EComposition of four functions: k ∘ h ∘ g ∘ f.
compose3Assoc
Section titled “compose3Assoc”def compose3Assoc {A B C D : Type} (h : C -> D) (g : B -> C) (f : A -> B) : compose3 h g f ≡ compose (compose h g) fThe triple composite equals the left-associated composite: compose3 h g f = (h ∘ g) ∘ f.
onApply
Section titled “onApply”def onApply {A B C : Type} (f : B -> B -> C) (g : A -> B) (x : A) (y : A) : on f g x y ≡ f (g x) (g y)The on combinator unfolds: on f g x y = f (g x) (g y).
def onId {A C : Type} (f : A -> A -> C) : on f (fun (x : A) => x) ≡ fUsing on with the identity function gives back the binary function: on f id = f.
funPathSym
Section titled “funPathSym”def funPathSym {A B : Type} {f g : A -> B} (p : f ≡ g) : (fun (x : A) => sym (happlyImpl p x)) ≡ (fun (x : A) => happlyImpl (sym p) x)Pointwise paths of an inverted function path are the inverses of its pointwise paths.
succ_injective
Section titled “succ_injective”def succ_injective : isInjective Nat Nat succThe successor function on natural numbers is injective.
not_injective
Section titled “not_injective”def not_injective : isInjective Bool Bool notBoolean negation is injective.
not_surjective
Section titled “not_surjective”def not_surjective : isSurjective Bool Bool notBoolean negation is surjective.
not_bijective
Section titled “not_bijective”def not_bijective : isBijective Bool Bool notBoolean negation is bijective.
not_hasSection
Section titled “not_hasSection”def not_hasSection : hasSection Bool Bool notBoolean negation is its own section.
not_hasRetraction
Section titled “not_hasRetraction”def not_hasRetraction : hasRetraction Bool Bool notBoolean negation is its own retraction.
not_isIso
Section titled “not_isIso”def not_isIso : isIso Bool Bool notBoolean negation is an isomorphism, with itself as inverse.
pointwiseEq
Section titled “pointwiseEq”def pointwiseEq {A B : Type} (f g : A -> B) (h : (x : A) -> f x ≡ g x) : f ≡ gBuilds a path f = g from pointwise paths f x = g x (function extensionality).
pointwiseRefl
Section titled “pointwiseRefl”def pointwiseRefl {A B : Type} (f : A -> B) : (x : A) -> f x ≡ f xPointwise reflexivity: f x = f x for every x.
pointwiseSym
Section titled “pointwiseSym”def pointwiseSym {A B : Type} (f g : A -> B) (h : (x : A) -> f x ≡ g x) : (x : A) -> g x ≡ f xPointwise symmetry: from f x = g x for all x, get g x = f x for all x.
pointwiseTrans
Section titled “pointwiseTrans”def pointwiseTrans {A B : Type} (f g h : A -> B) (p : (x : A) -> f x ≡ g x) (q : (x : A) -> g x ≡ h x) : (x : A) -> f x ≡ h xPointwise transitivity: from f x = g x and g x = h x for all x, get f x = h x for all x.
funSpaceRefl
Section titled “funSpaceRefl”def funSpaceRefl {A B : Type} (f : A -> B) : f ≡ fThe reflexivity path on a function.
funSpaceSym
Section titled “funSpaceSym”def funSpaceSym {A B : Type} {f g : A -> B} (p : f ≡ g) : g ≡ fInverts a path between functions: f = g gives g = f.
funSpaceCong
Section titled “funSpaceCong”def funSpaceCong {A B C : Type} {f g : A -> B} (h : B -> C) (p : f ≡ g) : compose h f ≡ compose h gPostcomposition respects paths: f = g implies h ∘ f = h ∘ g.
funSpaceCongDomain
Section titled “funSpaceCongDomain”def funSpaceCongDomain {A B C : Type} {f g : B -> C} (h : A -> B) (p : f ≡ g) : compose f h ≡ compose g hPrecomposition respects paths: f = g implies f ∘ h = g ∘ h.
isEmbedding
Section titled “isEmbedding”def isEmbedding (A : Type) (B : Type) (f : A -> B) : TypeThe type saying f is an embedding, here stated as injectivity: f a1 = f a2 implies a1 = a2.
embedding_is_injective
Section titled “embedding_is_injective”def embedding_is_injective (A : Type) (B : Type) (f : A -> B) (emb : isEmbedding A B f) : isInjective A B fAn embedding is injective.
Retract
Section titled “Retract”def Retract (A : Type) (B : Type) : TypeThe type of retractions of A onto B: maps s and r with r (s a) = a, exhibiting A as a retract of B.
retract_id
Section titled “retract_id”def retract_id (A : Type) : Retract A AEvery type is a retract of itself via the identity maps.
retract_compose
Section titled “retract_compose”def retract_compose (A : Type) (B : Type) (C : Type) (rAB : Retract A B) (rBC : Retract B C) : Retract A CRetracts compose: if A is a retract of B and B of C, then A is a retract of C.
iterateZero
Section titled “iterateZero”def iterateZero {A : Type} (f : A -> A) (x : A) : iterate zero f x ≡ xIterating f zero times is the identity: iterate 0 f x = x.
iterateOne
Section titled “iterateOne”def iterateOne {A : Type} (f : A -> A) (x : A) : iterate (succ zero) f x ≡ f xIterating f once is applying f: iterate 1 f x = f x.
iterateSucc
Section titled “iterateSucc”def iterateSucc {A : Type} (n : Nat) (f : A -> A) (x : A) : iterate (succ n) f x ≡ f (iterate n f x)One more iteration applies f once more: iterate (n + 1) f x = f (iterate n f x).
iterateId
Section titled “iterateId”def iterateId (A : Type) (n : Nat) (x : A) : iterate n (fun (a : A) => a) x ≡ xIterating the identity function any number of times returns the input.
isInvolution
Section titled “isInvolution”def isInvolution (A : Type) (f : A -> A) : TypeThe type saying f is an involution: f (f x) = x for every x.
involution_is_iso
Section titled “involution_is_iso”def involution_is_iso (A : Type) (f : A -> A) (inv : isInvolution A f) : isIso A A fAn involution is an isomorphism, with itself as inverse.
involution_injective
Section titled “involution_injective”def involution_injective (A : Type) (f : A -> A) (inv : isInvolution A f) : isInjective A A fAn involution is injective.
involution_surjective
Section titled “involution_surjective”def involution_surjective (A : Type) (f : A -> A) (inv : isInvolution A f) : isSurjective A A fAn involution is surjective.
involution_bijective
Section titled “involution_bijective”def involution_bijective (A : Type) (f : A -> A) (inv : isInvolution A f) : isBijective A A fAn involution is bijective.
not_involution
Section titled “not_involution”def not_involution : isInvolution Bool notBoolean negation is an involution.
isFixedPoint
Section titled “isFixedPoint”def isFixedPoint (A : Type) (f : A -> A) (x : A) : TypeThe type saying x is a fixed point of f: f x = x.
hasFixedPoint
Section titled “hasFixedPoint”def hasFixedPoint (A : Type) (f : A -> A) : TypeThe type of fixed points of f: some x together with a path f x = x.
idAllFixed
Section titled “idAllFixed”def idAllFixed (A : Type) (x : A) : isFixedPoint A (fun (a : A) => a) xEvery point is a fixed point of the identity function.
constFixed
Section titled “constFixed”def constFixed (A : Type) (a : A) : isFixedPoint A (fun (x : A) => a) aThe value a is a fixed point of the constant function at a.
isIdempotent
Section titled “isIdempotent”def isIdempotent (A : Type) (f : A -> A) : TypeThe type saying f is idempotent: f (f x) = f x for every x.
constIdempotent
Section titled “constIdempotent”def constIdempotent (A : Type) (a : A) : isIdempotent A (fun (x : A) => a)Every constant function is idempotent.
idIdempotentFn
Section titled “idIdempotentFn”def idIdempotentFn (A : Type) : isIdempotent A (fun (x : A) => x)The identity function is idempotent.
isCommutative
Section titled “isCommutative”def isCommutative (A : Type) (B : Type) (f : A -> A -> B) : TypeThe type saying a binary function is commutative: f x y = f y x.
isAssociative
Section titled “isAssociative”def isAssociative (A : Type) (f : A -> A -> A) : TypeThe type saying a binary operation is associative: f (f x y) z = f x (f y z).
isLeftIdentity
Section titled “isLeftIdentity”def isLeftIdentity (A : Type) (f : A -> A -> A) (e : A) : TypeThe type saying e is a left identity for f: f e x = x.
isRightIdentity
Section titled “isRightIdentity”def isRightIdentity (A : Type) (f : A -> A -> A) (e : A) : TypeThe type saying e is a right identity for f: f x e = x.
add_commutative
Section titled “add_commutative”def add_commutative : isCommutative Nat Nat addNatural-number addition is commutative.
add_associative
Section titled “add_associative”def add_associative : isAssociative Nat addNatural-number addition is associative.
add_left_identity
Section titled “add_left_identity”def add_left_identity : isLeftIdentity Nat add zeroZero is a left identity for natural-number addition.
add_right_identity
Section titled “add_right_identity”def add_right_identity : isRightIdentity Nat add zeroZero is a right identity for natural-number addition.
and_commutative
Section titled “and_commutative”def and_commutative : isCommutative Bool Bool andBoolean conjunction is commutative.
or_commutative
Section titled “or_commutative”def or_commutative : isCommutative Bool Bool orBoolean disjunction is commutative.
isLeftCancellable
Section titled “isLeftCancellable”def isLeftCancellable (A : Type) (B : Type) (f : A -> B) (a : A) : TypeThe type saying f can be cancelled at a: f a = f b implies a = b for every b.
injective_implies_cancellable
Section titled “injective_implies_cancellable”def injective_implies_cancellable (A : Type) (B : Type) (f : A -> B) (inj : isInjective A B f) (a : A) : isLeftCancellable A B f aAn injective function is left cancellable at every point.
FnGraph
Section titled “FnGraph”def FnGraph (A : Type) (B : Type) (f : A -> B) : TypeThe graph of f as a type: points a paired with the trivial path f a = f a.
graph_elem
Section titled “graph_elem”def graph_elem (A : Type) (B : Type) (f : A -> B) (a : A) : FnGraph A B fThe element of the graph of f determined by a point a.
graph_fst
Section titled “graph_fst”def graph_fst (A : Type) (B : Type) (f : A -> B) (g : FnGraph A B f) : AProjects a point of the graph of f to its domain coordinate.
compose_injective_implies_f
Section titled “compose_injective_implies_f”def compose_injective_implies_f (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (gfInj : isInjective A C (compose g f)) : isInjective A B fIf g ∘ f is injective, then f is injective.
surjective_compose_left
Section titled “surjective_compose_left”def surjective_compose_left (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (h : isSurjective A C (compose g f)) : isSurjective B C gIf g ∘ f is surjective, then g is surjective.
def FnRel (A : Type) (B : Type) : Type 1The type of binary relations between A and B, valued in types.
isFunctional
Section titled “isFunctional”def isFunctional (A : Type) (B : Type) (R : FnRel A B) : TypeThe type saying a relation is functional: each a is related to at most one b (up to paths).
isTotalRel
Section titled “isTotalRel”def isTotalRel (A : Type) (B : Type) (R : FnRel A B) : TypeThe type saying a relation is total: each a is related to some chosen b.
graphRel
Section titled “graphRel”def graphRel (A : Type) (B : Type) (f : A -> B) : FnRel A BThe graph relation of f: a is related to b when f a = b.
graphRel_functional
Section titled “graphRel_functional”def graphRel_functional (A : Type) (B : Type) (f : A -> B) : isFunctional A B (graphRel A B f)The graph relation of a function is functional.
graphRel_total
Section titled “graphRel_total”def graphRel_total (A : Type) (B : Type) (f : A -> B) : isTotalRel A B (graphRel A B f)The graph relation of a function is total.
def Pred (A : Type) : Type 1The type of type-valued predicates on A.
preimage_pred
Section titled “preimage_pred”def preimage_pred (A : Type) (B : Type) (f : A -> B) (P : Pred B) : Pred AThe preimage of a predicate P on B along f: holds at a when P (f a) holds.
preimageIdPred
Section titled “preimageIdPred”def preimageIdPred (A : Type) (P : Pred A) : preimage_pred A A (fun (x : A) => x) P ≡ PPulling back a predicate along the identity function gives the same predicate.
preimageComposePred
Section titled “preimageComposePred”def preimageComposePred (A : Type) (B : Type) (C : Type) (g : B -> C) (f : A -> B) (P : Pred C) : preimage_pred A C (compose g f) P ≡ preimage_pred A B f (preimage_pred B C g P)Pulling back along g ∘ f is pulling back along g and then along f.
endo_compose
Section titled “endo_compose”def endo_compose {A : Type} (g : A -> A) (f : A -> A) : A -> AComposition of two endomorphisms of A.
endoComposeAssoc
Section titled “endoComposeAssoc”def endoComposeAssoc {A : Type} (h : A -> A) (g : A -> A) (f : A -> A) : endo_compose h (endo_compose g f) ≡ endo_compose (endo_compose h g) fComposition of endomorphisms is associative.
endoComposeIdLeft
Section titled “endoComposeIdLeft”def endoComposeIdLeft {A : Type} (f : A -> A) : endo_compose (fun (x : A) => x) f ≡ fThe identity is a left unit for endomorphism composition.
endoComposeIdRight
Section titled “endoComposeIdRight”def endoComposeIdRight {A : Type} (f : A -> A) : endo_compose f (fun (x : A) => x) ≡ fThe identity is a right unit for endomorphism composition.
endo_power
Section titled “endo_power”def endo_power {A : Type} (f : A -> A) (n : Nat) : A -> AThe n-th power of an endomorphism: f composed with itself n times.
endoPowerZero
Section titled “endoPowerZero”def endoPowerZero {A : Type} (f : A -> A) (x : A) : endo_power f zero x ≡ xThe zeroth power of an endomorphism is the identity: f^0 x = x.
endoPowerOne
Section titled “endoPowerOne”def endoPowerOne {A : Type} (f : A -> A) (x : A) : endo_power f (succ zero) x ≡ f xThe first power of an endomorphism is the endomorphism itself: f^1 x = f x.
endoPowerSucc
Section titled “endoPowerSucc”def endoPowerSucc {A : Type} (f : A -> A) (n : Nat) (x : A) : endo_power f (succ n) x ≡ f (endo_power f n x)The successor power applies f once more: f^(n + 1) x = f (f^n x).
depFunExtSym
Section titled “depFunExtSym”def depFunExtSym {A : Type} {B : A -> Type} {f g : (x : A) -> B x} (p : f ≡ g) : g ≡ fInverts a path between dependent functions: f = g gives g = f.
depFunExtTrans
Section titled “depFunExtTrans”def depFunExtTrans {A : Type} {B : A -> Type} {f g h : (x : A) -> B x} (p : f ≡ g) (q : g ≡ h) : f ≡ hConcatenates paths between dependent functions: f = g and g = h give f = h.
self_compose
Section titled “self_compose”def self_compose {A : Type} (f : A -> A) : A -> AComposes an endomorphism with itself: f ∘ f.
selfComposeApply
Section titled “selfComposeApply”def selfComposeApply {A : Type} (f : A -> A) (x : A) : self_compose f x ≡ f (f x)Self-composition unfolds: (f ∘ f) x = f (f x).
involutionSelfCompose
Section titled “involutionSelfCompose”def involutionSelfCompose (A : Type) (f : A -> A) (inv : isInvolution A f) : (fun (x : A) => self_compose f x) ≡ (fun (x : A) => x)An involution composed with itself is the identity function.
fixedPointIterate
Section titled “fixedPointIterate”def fixedPointIterate (A : Type) (f : A -> A) (x : A) (fix : f x ≡ x) (n : Nat) : iterate n f x ≡ xIterating f from a fixed point stays there: iterate n f x = x whenever f x = x.
pred_retraction_succ
Section titled “pred_retraction_succ”def pred_retraction_succ : hasRetraction Nat Nat succThe predecessor function is a retraction of the successor: pred (succ n) = n.
mapComposeFn
Section titled “mapComposeFn”def mapComposeFn {A B C : Type} (f : B -> C) (g : A -> B) (xs : List A) : map f (map g xs) ≡ map (compose f g) xsMapping over a list respects composition: map f (map g xs) = map (f ∘ g) xs.
CommSquare
Section titled “CommSquare”def CommSquare (A : Type) (B : Type) (C : Type) (D : Type) (f : A -> B) (g : C -> D) (h : A -> C) (k : B -> D) : TypeThe type saying a square of functions commutes: k (f a) = g (h a) for every a.
idCommute
Section titled “idCommute”def idCommute (A : Type) (B : Type) (f : A -> B) : CommSquare A B A B f f (fun (x : A) => x) (fun (x : B) => x)The square with f on two opposite sides and identities on the other two commutes.
flipCommutative
Section titled “flipCommutative”def flipCommutative (A : Type) (B : Type) (f : A -> A -> B) (comm : isCommutative A B f) (x : A) (y : A) : flip f x y ≡ f x yFor a commutative binary function, flipping does not change the result: flip f x y = f x y.
pointwiseCompose
Section titled “pointwiseCompose”def pointwiseCompose {A B C : Type} (h : B -> C) (f g : A -> B) (pw : (x : A) -> f x ≡ g x) : (x : A) -> h (f x) ≡ h (g x)Postcomposing preserves pointwise paths: f x = g x for all x gives h (f x) = h (g x).
pointwisePrecompose
Section titled “pointwisePrecompose”def pointwisePrecompose {A B C : Type} (h : A -> B) (f g : B -> C) (pw : (x : B) -> f x ≡ g x) : (x : A) -> f (h x) ≡ g (h x)Precomposing preserves pointwise paths: f x = g x for all x gives f (h x) = g (h x).
doubleEq
Section titled “doubleEq”def doubleEq (n : Nat) : add n n ≡ double nDoubling a natural number is adding it to itself: n + n = double n.
mulTwoEq
Section titled “mulTwoEq”def mulTwoEq (n : Nat) : mul (succ (succ zero)) n ≡ add n (add n zero)Multiplying by two unfolds to repeated addition: 2 * n = n + (n + 0).
composeFlipInteraction
Section titled “composeFlipInteraction”def composeFlipInteraction {A B C D : Type} (f : C -> D) (g : A -> B -> C) : (fun (b : B) => fun (a : A) => f (g a b)) ≡ (fun (b : B) => compose f (fun (a : A) => g a b))Postcomposing f inside a flipped two-argument function equals composing f with each partial application.
idComposeBoth
Section titled “idComposeBoth”def idComposeBoth {A : Type} : compose (fun (x : A) => x) (fun (x : A) => x) ≡ (fun (x : A) => x)The identity composed with itself is the identity: id ∘ id = id.
succPredSucc
Section titled “succPredSucc”def succPredSucc (n : Nat) : succ (pred (succ n)) ≡ succ nPredecessor cancels successor under succ: succ (pred (succ n)) = succ n.
predZero
Section titled “predZero”def predZero : pred zero ≡ zeroThe predecessor of zero is zero.
andIdempotent
Section titled “andIdempotent”def andIdempotent (a : Bool) : and a a ≡ aBoolean conjunction is idempotent: a && a = a.
orIdempotent
Section titled “orIdempotent”def orIdempotent (a : Bool) : or a a ≡ aBoolean disjunction is idempotent: a || a = a.
andTrueRightFn
Section titled “andTrueRightFn”def andTrueRightFn (a : Bool) : and a true ≡ aTrue is a right identity for conjunction: a && true = a.
orFalseRightFn
Section titled “orFalseRightFn”def orFalseRightFn (a : Bool) : or a false ≡ aFalse is a right identity for disjunction: a || false = a.
lengthMapFn
Section titled “lengthMapFn”def lengthMapFn {A B : Type} (f : A -> B) (xs : List A) : length (map f xs) ≡ length xsMapping a function over a list preserves its length.
appendNilFn
Section titled “appendNilFn”def appendNilFn {A : Type} (xs : List A) : append xs nil ≡ xsAppending the empty list on the right leaves a list unchanged: xs ++ [] = xs.