Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(* -*- coding: utf-8 -*- *)
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
(* <O___,, * (see CREDITS file for the list of authors) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
Proofs about standard combinators, exports functional extensionality.
Require Import Coq.Program.Basics. Require Export FunctionalExtensionality. Open Scope program_scope.
Composition has id for neutral element and is associative.
forall (A B : Type) (f : A -> B), id ∘ f = fforall (A B : Type) (f : A -> B), id ∘ f = freflexivity. Qed.A, B:Typef:A -> Bid ∘ f = fforall (A B : Type) (f : A -> B), f ∘ id = fforall (A B : Type) (f : A -> B), f ∘ id = freflexivity. Qed.A, B:Typef:A -> Bf ∘ id = fforall (A B C D : Type) (f : A -> B) (g : B -> C) (h : C -> D), h ∘ g ∘ f = h ∘ (g ∘ f)forall (A B C D : Type) (f : A -> B) (g : B -> C) (h : C -> D), h ∘ g ∘ f = h ∘ (g ∘ f)reflexivity. Qed. Hint Rewrite @compose_id_left @compose_id_right : core. Hint Rewrite <- @compose_assoc : core.A, B, C, D:Typef:A -> Bg:B -> Ch:C -> Dh ∘ g ∘ f = h ∘ (g ∘ f)
flip is involutive.
forall A B C : Type, flip ∘ flip = idforall A B C : Type, flip ∘ flip = idreflexivity. Qed.A, B, C:Typeflip ∘ flip = id
prod_curry and prod_uncurry are each others inverses.
forall A B C : Type, prod_uncurry ∘ prod_curry = idforall A B C : Type, prod_uncurry ∘ prod_curry = idreflexivity. Qed.A, B, C:Typeprod_uncurry ∘ prod_curry = idforall A B C : Type, prod_curry ∘ prod_uncurry = idforall A B C : Type, prod_curry ∘ prod_uncurry = idA, B, C:Typeprod_curry ∘ prod_uncurry = idA, B, C:Type(fun (x : A * B -> C) (p : A * B) => let (x0, y) := p in x (x0, y)) = iddestruct p ; simpl ; reflexivity. Qed.A, B, C:Typex:A * B -> Cp:(A * B)%type(let (x0, y) := p in x (x0, y)) = id x p