Commit 84e29d99 by Raphael Cauderlier

### arity -> domain

parent 8b720c66
 ... @@ -25,9 +25,9 @@ def 2 := nat.S 1. ... @@ -25,9 +25,9 @@ def 2 := nat.S 1. (; Signature ;) (; Signature ;) A : sort. A : sort. LEQ : predicate. LEQ : predicate. [] fol.pred_arity LEQ --> read_sorts 2 A A. [] fol.pred_domain LEQ --> read_sorts 2 A A. N : function. N : function. [] fol.fun_arity N --> nil_sort. [] fol.fun_domain N --> nil_sort. [] fol.fun_codomain N --> A. [] fol.fun_codomain N --> A. def leq : term A -> term A -> prop := pred_apply LEQ. def leq : term A -> term A -> prop := pred_apply LEQ. ... ...
 ... @@ -12,13 +12,13 @@ BAR : fol.sort. ... @@ -12,13 +12,13 @@ BAR : fol.sort. (; We have to assume that the bar is not empty, that is we have a term (; We have to assume that the bar is not empty, that is we have a term of sort BAR. Let's call it Joe. ;) of sort BAR. Let's call it Joe. ;) JOE : fol.function. JOE : fol.function. [] fol.fun_arity JOE --> fol.nil_sort. [] fol.fun_domain JOE --> fol.nil_sort. [] fol.fun_codomain JOE --> BAR. [] fol.fun_codomain JOE --> BAR. def Joe : fol.term BAR := fol.fun_apply JOE. def Joe : fol.term BAR := fol.fun_apply JOE. (; The "drink" predicate. ;) (; The "drink" predicate. ;) DRINK : fol.predicate. DRINK : fol.predicate. [] fol.pred_arity DRINK --> fol.read_sorts (nat.S nat.O) BAR. [] fol.pred_domain DRINK --> fol.read_sorts (nat.S nat.O) BAR. def drink (x : fol.term BAR) : fol.prop := fol.pred_apply DRINK x. def drink (x : fol.term BAR) : fol.prop := fol.pred_apply DRINK x. def drinker_statement : fol.prop := def drinker_statement : fol.prop := ... ...
 ... @@ -24,12 +24,12 @@ def 1 := nat.S 0. ... @@ -24,12 +24,12 @@ def 1 := nat.S 0. (; Signature ;) (; Signature ;) A : sort. A : sort. P : predicate. P : predicate. [] fol.pred_arity P --> read_sorts 1 A. [] fol.pred_domain P --> read_sorts 1 A. O : function. O : function. [] fol.fun_arity O --> nil_sort. [] fol.fun_domain O --> nil_sort. [] fol.fun_codomain O --> A. [] fol.fun_codomain O --> A. S : function. S : function. [] fol.fun_arity S --> read_sorts 1 A. [] fol.fun_domain S --> read_sorts 1 A. [] fol.fun_codomain S --> A. [] fol.fun_codomain S --> A. def p : term A -> prop := pred_apply P. def p : term A -> prop := pred_apply P. ... ...
 #NAME clauses. #NAME clauses. atom : Type. atom : Type. mk_atom : p : fol.predicate -> fol.terms (fol.pred_arity p) -> atom. mk_atom : p : fol.predicate -> fol.terms (fol.pred_domain p) -> atom. litteral : Type. litteral : Type. pos_lit : atom -> litteral. pos_lit : atom -> litteral. ... ...
 ... @@ -14,12 +14,12 @@ def all := fol.all. ... @@ -14,12 +14,12 @@ def all := fol.all. def proof := fol.proof. def proof := fol.proof. def predicate := fol.predicate. def predicate := fol.predicate. def pred_arity := fol.pred_arity. def pred_domain := fol.pred_domain. def pred_apply := fol.pred_apply. def pred_apply := fol.pred_apply. def apply_pred := fol.apply_pred. def apply_pred := fol.apply_pred. def function := fol.function. def function := fol.function. def fun_arity := fol.fun_arity. def fun_domain := fol.fun_domain. def fun_codomain := fol.fun_codomain. def fun_codomain := fol.fun_codomain. def apply_fun := fol.apply_fun. def apply_fun := fol.apply_fun. ... @@ -28,7 +28,7 @@ def S := nat.S. ... @@ -28,7 +28,7 @@ def S := nat.S. (; Equality is a family of binary predicate symbols. ;) (; Equality is a family of binary predicate symbols. ;) Eq : sort -> predicate. Eq : sort -> predicate. [A] fol.pred_arity (Eq A) --> read_sorts (S (S O)) A A. [A] fol.pred_domain (Eq A) --> read_sorts (S (S O)) A A. def eq (A : sort) : term A -> term A -> prop := pred_apply (Eq A). def eq (A : sort) : term A -> term A -> prop := pred_apply (Eq A). [A,x,y] [A,x,y] ... @@ -97,8 +97,8 @@ def eq_pred_imp : L : sorts -> p : (terms L -> prop) -> proof (pred_imp L p p). ... @@ -97,8 +97,8 @@ def eq_pred_imp : L : sorts -> p : (terms L -> prop) -> proof (pred_imp L p p). (H => (H => eq_congr A x y H (y : term A => pred_imp L (l : terms L => p (cons_term A x L l)) (l : terms L => p (cons_term A y L l))) (eq_pred_imp L (l : terms L => p (cons_term A x L l)))))). eq_congr A x y H (y : term A => pred_imp L (l : terms L => p (cons_term A x L l)) (l : terms L => p (cons_term A y L l))) (eq_pred_imp L (l : terms L => p (cons_term A x L l)))))). thm eq_pred_equal (p : predicate) : proof (pred_imp (pred_arity p) (apply_pred p) (apply_pred p)) thm eq_pred_equal (p : predicate) : proof (pred_imp (pred_domain p) (apply_pred p) (apply_pred p)) := eq_pred_imp (pred_arity p) (apply_pred p). := eq_pred_imp (pred_domain p) (apply_pred p). def fun_eq : L : sorts -> B : sort -> (terms L -> term B) -> (terms L -> term B) -> prop. def fun_eq : L : sorts -> B : sort -> (terms L -> term B) -> (terms L -> term B) -> prop. [B,b,b'] fun_eq fol.nil_sort B b b' --> eq B (b nil_term) (b' nil_term) [B,b,b'] fun_eq fol.nil_sort B b b' --> eq B (b nil_term) (b' nil_term) ... @@ -118,5 +118,5 @@ def eq_fun_eq : L : sorts -> B : sort -> f : (terms L -> term B) -> proof (fun_e ... @@ -118,5 +118,5 @@ def eq_fun_eq : L : sorts -> B : sort -> f : (terms L -> term B) -> proof (fun_e (H => (H => eq_congr A x y H (y : term A => fun_eq L B (l : terms L => f (cons_term A x L l)) (l : terms L => f (cons_term A y L l))) (eq_fun_eq L B (l : terms L => f (cons_term A x L l)))))). eq_congr A x y H (y : term A => fun_eq L B (l : terms L => f (cons_term A x L l)) (l : terms L => f (cons_term A y L l))) (eq_fun_eq L B (l : terms L => f (cons_term A x L l)))))). thm eq_fun_equal (f : function) : proof (fun_eq (fun_arity f) (fun_codomain f) (apply_fun f) (apply_fun f)) thm eq_fun_equal (f : function) : proof (fun_eq (fun_domain f) (fun_codomain f) (apply_fun f) (apply_fun f)) := eq_fun_eq (fun_arity f) (fun_codomain f) (apply_fun f). := eq_fun_eq (fun_domain f) (fun_codomain f) (apply_fun f).