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.
(************************************************************************)
(* * 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) *)
(************************************************************************)
Author: Bruno Barras
Section Inverse_Image. Variables A B : Type. Variable R : B -> B -> Prop. Variable f : A -> B. Let Rof (x y:A) : Prop := R (f x) (f y).A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propforall y : B, Acc R y -> forall x : A, y = f x -> Acc Rof xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propforall y : B, Acc R y -> forall x : A, y = f x -> Acc Rof xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x0 y0 : A => R (f x0) (f y0):A -> A -> Propy:BIHAcc:forall y0 : B, R y0 y -> forall x0 : A, y0 = f x0 -> Acc Rof x0x:AH:y = f xAcc Rof xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x0 y1 : A => R (f x0) (f y1):A -> A -> Propy:BIHAcc:forall y1 : B, R y1 y -> forall x0 : A, y1 = f x0 -> Acc Rof x0x:AH:y = f xy0:AH1:Rof y0 xAcc Rof y0rewrite H; trivial. Qed.A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x0 y1 : A => R (f x0) (f y1):A -> A -> Propy:BIHAcc:forall y1 : B, R y1 y -> forall x0 : A, y1 = f x0 -> Acc Rof x0x:AH:y = f xy0:AH1:Rof y0 xR (f y0) yA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propforall x : A, Acc R (f x) -> Acc Rof xintros; apply (Acc_lemma (f x)); trivial. Qed.A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propforall x : A, Acc R (f x) -> Acc Rof xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propwell_founded R -> well_founded Rofred; intros; apply Acc_inverse_image; auto. Qed. Variable F : A -> B -> Prop. Let RoF (x y:A) : Prop := exists2 b : B, F x b & (forall c:B, F y c -> R b c).A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> Propwell_founded R -> well_founded RofA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> PropF:A -> B -> PropRoF:=fun x y : A => exists2 b : B, F x b & forall c : B, F y c -> R b c:A -> A -> Propforall b : B, Acc R b -> forall x : A, F x b -> Acc RoF xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> PropF:A -> B -> PropRoF:=fun x y : A => exists2 b : B, F x b & forall c : B, F y c -> R b c:A -> A -> Propforall b : B, Acc R b -> forall x : A, F x b -> Acc RoF xA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x1 y : A => R (f x1) (f y):A -> A -> PropF:A -> B -> PropRoF:=fun x1 y : A => exists2 b : B, F x1 b & forall c : B, F y c -> R b c:A -> A -> Propx:BIHAcc:forall y : B, R y x -> forall x1 : A, F x1 y -> Acc RoF x1x0:AH2:F x0 xAcc RoF x0A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x1 y0 : A => R (f x1) (f y0):A -> A -> PropF:A -> B -> PropRoF:=fun x1 y0 : A => exists2 b : B, F x1 b & forall c : B, F y0 c -> R b c:A -> A -> Propx:BIHAcc:forall y0 : B, R y0 x -> forall x1 : A, F x1 y0 -> Acc RoF x1x0:AH2:F x0 xy:AH3:RoF y x0Acc RoF yapply (IHAcc x1); auto. Qed.A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x2 y0 : A => R (f x2) (f y0):A -> A -> PropF:A -> B -> PropRoF:=fun x2 y0 : A => exists2 b : B, F x2 b & forall c : B, F y0 c -> R b c:A -> A -> Propx:BIHAcc:forall y0 : B, R y0 x -> forall x2 : A, F x2 y0 -> Acc RoF x2x0:AH2:F x0 xy:Ax1:BH:F y x1H0:forall c : B, F x0 c -> R x1 cAcc RoF yA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> PropF:A -> B -> PropRoF:=fun x y : A => exists2 b : B, F x b & forall c : B, F y c -> R b c:A -> A -> Propwell_founded R -> well_founded RoFA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y : A => R (f x) (f y):A -> A -> PropF:A -> B -> PropRoF:=fun x y : A => exists2 b : B, F x b & forall c : B, F y c -> R b c:A -> A -> Propwell_founded R -> well_founded RoFA, B:TypeR:B -> B -> Propf:A -> BRof:=fun x y0 : A => R (f x) (f y0):A -> A -> PropF:A -> B -> PropRoF:=fun x y0 : A => exists2 b : B, F x b & forall c : B, F y0 c -> R b c:A -> A -> PropH:well_founded Ra, y:AH0:RoF y aAcc RoF yapply (Acc_inverse_rel x); auto. Qed. End Inverse_Image.A, B:TypeR:B -> B -> Propf:A -> BRof:=fun x0 y0 : A => R (f x0) (f y0):A -> A -> PropF:A -> B -> PropRoF:=fun x0 y0 : A => exists2 b : B, F x0 b & forall c : B, F y0 c -> R b c:A -> A -> PropH:well_founded Ra, y:AH0:RoF y ax:BH1:F y xH2:forall c : B, F a c -> R x cAcc RoF y