1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "logic/connectives.ma".
17 coinductive fish (A:Type) (i: A → Type) (C: ∀a:A.i a → A → Prop) (U: A → Prop)
20 mk_foo: ∀a:A. (U a ∧ ∀j: i a. ∃y: A. C a j y ∧ fish A i C U y) → fish A i C U a.
22 let corec fish_rec (A:Type) (i: A → Type) (C: ∀a:A.i a → A → Prop) (U: A → Prop)
23 (P: A → Prop) (H1: ∀a:A. P a → U a)
24 (H2: ∀a:A. P a → ∀j: i a. ∃y: A. C a j y ∧ P y) :
25 ∀a:A. ∀p: P a. fish A i C U a ≝
31 [ ex_intro (y: A) (Ha: C a j y ∧ P y) ⇒
33 [ conj (fHa: C a j y) (sHa: P y) ⇒
34 ex_intro A (λy.C a j y ∧ fish A i C U y) y
35 (conj ? ? fHa (fish_rec A i C U P H1 H2 y sHa))