Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  congruence.v   Sprache: Coq

 

Inductive Inner : Type :=
| innerI_nat : forall (x:nat), Inner
| innerI_fun : forall (f:nat->Type), Inner
| innerI_inner : forall (i:Inner), Inner
| innerI_Type : forall (T:Type), Inner
| innerI_extra : Inner.

Inductive ExtractTest (A:Type) (F:nat->Type) (I:Inner): Inner -> Inner -> unit -> Type :=
| extract_f_x_from_index : forall (x:nat) (f:nat->Type) (t:f x),
    ExtractTest A F I (innerI_inner (innerI_nat x)) (innerI_fun f) tt
| extract_F_from_param_x_from_index : forall (x:nat) (f:nat->Type) (t:F x),
    ExtractTest A F I (innerI_inner (innerI_nat x)) innerI_extra tt
| extract_fail : forall (x y: nat) (f : nat -> Type) (t : f x),
    ExtractTest A F I (innerI_nat y) (innerI_fun f) tt
| extract_fx_from_index : forall (x:nat) (f:nat->Type) (t:f x),
    ExtractTest A F I (innerI_Type (f x)) innerI_extra tt
| extract_t_match : forall (b:bool) (t:if b then unit else nat),
    ExtractTest A F I (innerI_Type (if b then unit else nat)) innerI_extra tt
.

(* This still dosn't work, because the fields type isn't composeable from extracteable parts of its inductive type.*)
Lemma test_extract_fail A F x y f t1 t2 : extract_fail A F innerI_extra x y f t1 = extract_fail A F innerI_extra x y f t2 -> t1 = t2.
Proof.
    Fail congruence.
Abort.

(* I think this should also work when the whole match statement is part of the inductive type, but something with universes is wrong because A is Type but if b then unit else nat is Set below is the projection that is getting created but it doesn't work *)
Lemma test_extract_t_match_success (A:Set) (F:nat->Type) (b:bool) (t1 t2: if b then unit else nat) :
extract_t_match A F innerI_extra b t1 = extract_t_match A F innerI_extra b t2 -> t1 = t2.
Proof.
    intros H.
    ail.
Abort.


  projAT)(:-Type)(: t1if    )=
    (fun
    e  : (:,
          (innerI_Type :java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  
    e in (ExtractTestjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 75
    
      (match i     ExtractTest A Fjava.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 54
       | innerI_Type T => T
       | _ => if  Ijava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
       -
       match i with
        java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 27
       | _ => if b then Lemma test_extract_fail A F  x   java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 133
       end
  with
  | extract_f_x_from_index _ _ _ x f _ =>
      fun
        t : match innerI_inner (innerI_nat x) with
             innerI_Type T => T
            | _ => if b then unit else nat
            end =>
      t
  | extract_F_from_param_x_from_index _ _ _ x _ _ =>
      fun
        t : match innerI_inner (innerI_nat x) with
              (:) (:-T b:)(1t2     ):
            | _ =>  b   java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 89
            
      t
  |:  
      fun
           y
            | innerI_Type T => T
            | _ => if b then unit else nat
            end =>
      t
  | extract_fx_from_index _ _ _ x f _ =>
      un
          java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 40
            | innerI_Type T |java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 27
            | _ java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
            end=
      t
  | extract_t_match java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
      fun
        _ :             =
            | java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
            | _ |= java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
            
      t
  end t1).

Messung V0.5 in Prozent
C=95 H=95 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723