@@ -351,12 +351,12 @@ Qed.
351351
352352(** *** Evaluations *)
353353
354- Lemma term_eval_lift_n (fcts: nat -> list nat -> nat) (sigma sigma ': list nat) (idx: nat) (t: term):
355- term_eval fcts (sigma ++ (idx :: sigma ')) (term_lift (length sigma ) 1 t) =
356- term_eval fcts (sigma ++ sigma ') t.
354+ Lemma term_eval_lift_n (fcts: nat -> list nat -> nat) (σ σ ': list nat) (idx: nat) (t: term):
355+ term_eval fcts (σ ++ (idx :: σ ')) (term_lift (length σ ) 1 t) =
356+ term_eval fcts (σ ++ σ ') t.
357357Proof .
358358 induction t as [ idx' | ? terms IHterms ]; simpl.
359- - destruct (PeanoNat.Nat.ltb_spec idx' (length sigma )); simpl.
359+ - destruct (PeanoNat.Nat.ltb_spec idx' (length σ )); simpl.
360360 + rewrite !app_nth1 by assumption.
361361 reflexivity.
362362
@@ -365,26 +365,26 @@ Proof.
365365 rewrite PeanoNat.Nat.sub_succ_l by assumption.
366366 simpl; lia.
367367
368- - replace (map _ _) with (map (term_eval fcts (sigma ++ sigma ')) terms); [ reflexivity |].
368+ - replace (map _ _) with (map (term_eval fcts (σ ++ σ ')) terms); [ reflexivity |].
369369 solve_TApp_case terms IHterms.
370370Qed .
371371
372- Lemma term_eval_lift_0 (fcts: nat -> list nat -> nat) (sigma sigma ': list nat) (t: term):
373- term_eval fcts sigma t = term_eval fcts (sigma ' ++ sigma ) (term_lift 0 (length sigma ') t).
372+ Lemma term_eval_lift_0 (fcts: nat -> list nat -> nat) (σ σ ': list nat) (t: term):
373+ term_eval fcts σ t = term_eval fcts (σ ' ++ σ ) (term_lift 0 (length σ ') t).
374374Proof .
375375 induction t as [ idx | ? terms IHterms ]; simpl.
376376 - rewrite app_nth2 by lia.
377377 replace (idx + _ - _) with idx by lia.
378378 reflexivity.
379379
380- - replace (map _ (map _ _)) with (map (term_eval fcts sigma ) terms); [ reflexivity |].
380+ - replace (map _ (map _ _)) with (map (term_eval fcts σ ) terms); [ reflexivity |].
381381 solve_TApp_case terms IHterms.
382382Qed .
383383
384384Lemma term_eval_lift_n_iter (fcts: nat -> list nat -> nat)
385- (sigma sigma ': list nat) (idx: nat) (terms: list term):
386- map (term_eval fcts (sigma ++ idx :: sigma ')) (map (term_lift (length sigma ) 1) terms) =
387- map (term_eval fcts (sigma ++ sigma ')) terms.
385+ (σ σ ': list nat) (idx: nat) (terms: list term):
386+ map (term_eval fcts (σ ++ idx :: σ ')) (map (term_lift (length σ ) 1) terms) =
387+ map (term_eval fcts (σ ++ σ ')) terms.
388388Proof .
389389 induction terms; simpl.
390390 { reflexivity. }
@@ -393,20 +393,20 @@ Proof.
393393 f_equal; assumption.
394394Qed .
395395
396- Lemma term_eval_subst_lift (fcts: nat -> list nat -> nat) (sigma sigma ': list nat) (t t': term):
397- term_eval fcts (sigma ++ sigma ') (term_subst (length sigma ) (term_lift 0 (length sigma ) t') t)
398- = term_eval fcts (sigma ++ (term_eval fcts sigma ' t') :: sigma ') t.
396+ Lemma term_eval_subst_lift (fcts: nat -> list nat -> nat) (σ σ ': list nat) (t t': term):
397+ term_eval fcts (σ ++ σ ') (term_subst (length σ ) (term_lift 0 (length σ ) t') t)
398+ = term_eval fcts (σ ++ (term_eval fcts σ ' t') :: σ ') t.
399399Proof .
400400 induction t as [ idx | ? terms IHterms ]; simpl.
401401 2: { f_equal; solve_TApp_case terms IHterms. }
402402
403- destruct (PeanoNat.Nat.eqb_spec (length sigma ) idx) as [ Heq |]; simpl.
403+ destruct (PeanoNat.Nat.eqb_spec (length σ ) idx) as [ Heq |]; simpl.
404404 { rewrite <- Heq.
405405 rewrite nth_middle.
406406 rewrite <- term_eval_lift_0.
407407 reflexivity. }
408408
409- destruct (PeanoNat.Nat.ltb_spec (length sigma ) idx) as [ Heq |]; simpl.
409+ destruct (PeanoNat.Nat.ltb_spec (length σ ) idx) as [ Heq |]; simpl.
410410 { destruct idx; [ lia |]; simpl.
411411 rewrite PeanoNat.Nat.sub_0_r.
412412 rewrite !app_nth2; [| lia.. ].
@@ -481,14 +481,14 @@ Proof.
481481Qed .
482482
483483Lemma formula_eval_S (fcts: nat -> list nat -> nat) (preds: nat -> list nat -> Prop )
484- (phi: formula) (sigma sigma ': list nat) (idx: nat):
485- formula_eval fcts preds (sigma ++ idx :: sigma ') (formula_lift (length sigma ) 1 phi) <->
486- formula_eval fcts preds (sigma ++ sigma ') phi.
484+ (phi: formula) (σ σ ': list nat) (idx: nat):
485+ formula_eval fcts preds (σ ++ idx :: σ ') (formula_lift (length σ ) 1 phi) <->
486+ formula_eval fcts preds (σ ++ σ ') phi.
487487Proof .
488- generalize sigma .
488+ generalize σ .
489489
490490 induction phi as [ | ? IHphi1 ? IHphi2 | ? IHphi1 ? IHphi2 | ? IHphi1 ? IHphi2 | | | ? IHphi | ? IHphi ];
491- simpl; intros sigma ''.
491+ simpl; intros σ ''.
492492
493493 (* FAtom *)
494494 - rewrite term_eval_lift_n_iter.
@@ -517,28 +517,28 @@ Proof.
517517
518518 (* FForAll *)
519519 - split; intros Hphi x.
520- all: apply (IHphi (x :: sigma '')).
520+ all: apply (IHphi (x :: σ '')).
521521 all: apply Hphi.
522522
523523 (* FExists *)
524524 - split; intros [x Heval].
525525 all: exists x.
526- all: apply (IHphi (x :: sigma '')).
526+ all: apply (IHphi (x :: σ '')).
527527 all: apply Heval.
528528Qed .
529529
530530Lemma formula_eval_subst_lift (fcts: nat -> list nat -> nat) (preds: nat -> list nat -> Prop )
531- (phi: formula) (sigma sigma ': list nat) (t: term):
532- formula_eval fcts preds (sigma ++ sigma ') (formula_subst (length sigma ) (term_lift 0 (length sigma ) t) phi)
533- <-> formula_eval fcts preds (sigma ++ (term_eval fcts sigma ' t) :: sigma ') phi.
531+ (phi: formula) (σ σ ': list nat) (t: term):
532+ formula_eval fcts preds (σ ++ σ ') (formula_subst (length σ ) (term_lift 0 (length σ ) t) phi)
533+ <-> formula_eval fcts preds (σ ++ (term_eval fcts σ ' t) :: σ ') phi.
534534Proof .
535- generalize sigma .
535+ generalize σ .
536536
537537 induction phi as [ ? terms | ? IHphi1 ? IHphi2 | ? IHphi1 ? IHphi2 | ? IHphi1 ? IHphi2 | | | ? IHphi | ? IHphi ];
538- simpl; intros sigma ''.
538+ simpl; intros σ ''.
539539
540540 (* FAtom *)
541- - replace (map _ _) with (map (term_eval fcts (sigma '' ++ term_eval fcts sigma ' t :: sigma ')) terms); [ reflexivity |].
541+ - replace (map _ _) with (map (term_eval fcts (σ '' ++ term_eval fcts σ ' t :: σ ')) terms); [ reflexivity |].
542542 induction terms as [| ? ? IHterms ]; simpl.
543543 { reflexivity. }
544544
@@ -570,28 +570,28 @@ Proof.
570570
571571 (* FForAll *)
572572 - split; intros Hphi x; simpl.
573- + apply (IHphi (x :: sigma '')).
574- replace (term_lift _ _ _) with (term_lift 0 1 (term_lift 0 (length sigma '') t)).
573+ + apply (IHphi (x :: σ '')).
574+ replace (term_lift _ _ _) with (term_lift 0 1 (term_lift 0 (length σ '') t)).
575575 { apply Hphi. }
576576
577577 rewrite term_lift_0_lift_0.
578578 reflexivity.
579579
580- + specialize (IHphi (x :: sigma '')).
580+ + specialize (IHphi (x :: σ '')).
581581 rewrite term_lift_0_lift_0.
582582 apply IHphi.
583583 apply Hphi.
584584
585585 (* FExists *)
586586 - split; intros [x Hphi]; exists x; simpl.
587- + apply (IHphi (x :: sigma '')).
588- replace (term_lift _ _ _) with (term_lift 0 1 (term_lift 0 (length sigma '') t)).
587+ + apply (IHphi (x :: σ '')).
588+ replace (term_lift _ _ _) with (term_lift 0 1 (term_lift 0 (length σ '') t)).
589589 { apply Hphi. }
590590
591591 rewrite term_lift_0_lift_0.
592592 reflexivity.
593593
594- + specialize (IHphi (x :: sigma '')).
594+ + specialize (IHphi (x :: σ '')).
595595 rewrite term_lift_0_lift_0.
596596 apply IHphi.
597597 apply Hphi.
0 commit comments