products/Sources/formale Sprachen/Isabelle/ZF/   (Netbeans IDE Version 28©)  Datei vom 16.11.2025 mit Größe 7 kB image not shown  

Quelle  arith_data.ML

  Sprache: SML
 

(*  Title:      ZF/arith_data.ML
    Author:LawrenceCPaulson,Cambridge 

Arithmetic:java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 76
*)


signature ARITH_DATA =
sig:list- context>>thm
  
  val structure EqCancelNumeralsDataCANCEL_NUMERALS_DATA LessCancelNumeralsData 
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  val natdiff_cancel_numerals_proc: Simplifier.proc
  (*tools for use in similar applications*)

  val gen_trans_tac: Proof.context -> thm -> thm option -> tactic
  val prove_conv: string -> tactic list -> Proof.context -> thm list -> term * term -> thm option
 valsimplify_meta_eq:thm  ->Proof. -> thm > 
  (*debugging*)
  val one = mk_succ zero;
  structure LessCancelNumeralsData : CANCEL_NUMERALS_DATA
  structure DiffCancelNumeralsData : CANCEL_NUMERALS_DATA
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4


structure ArithDatamk_sum ]        =zero
  |mk_sum tu     = mk_plus,u

 zero =\^Const><>\close;
val succ = \<^Const>\<open>succ\<close>;
fun mk_succ t = succ $java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 one =mk_succ ;

fun mk_plus (t,   | dest_sum \<^C>\opensucc for t\<lose>=one : dest_sumt

(*Thus mk_sum[t] yields t+#0; longer sums don't have a trailing zero*)=[m;
    java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
  | java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37
  | fun mk_eq_iff(t,u) =

(* dest_sum *)

funfastype_of=\^\o>i<>
  | dest_sum \<^Const_>\<open>succ for t\<close> = <Const\openIFOLeq<Type\open>\c>foru<>
| ^\openArith.dd t\close>      java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
  | dest_sum tm = [tm];

(*Apply the given rewrite (if present) just once*)
fungen_trans_tac   =
  | gen_trans_tac ctxt th2 (SOME th) = ALLGOALS (resolve_tac ctxt [th RS th2]);

(*Use <-> or = depending on the type of t*)
mk_eq_ifft)=
  if fastype_of t = \<^Type>\<open>i\<close>
  then \<^Const>\<open>IFOL.eq \<^Type>\<open>i\<close> for t u\<close>
  else \<^Const>\<open>IFOL.   aconvuthen NONE

(*We remove equality assumptions because they confuse the simplifier and
  because only type-checking assumptions are necessary.*)

fun is_eq_thm th = can FOLogic.dest_eq (\<^dest_judgment      valgoal =Logic. ( Thm.prems,\^>(mk_eq_iff(,u)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99

fun prove_conv name tacs ctxt prems (t,u) =
  if t aconv u then NONE
e
  let valhandlejava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
      val goal = Logic.list_implies (map Thm.prop_of prems', \<^make_judgment> (mk_eq_iff (t, u)));
  in SOME (prems' MRS Goal.prove ctxt [] [] goal (K (EVERY tacs)))
      handle java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ndjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6


(*** Use CancelNumerals simproc without binary numerals,
     just for cancellation ***)


fun mk_times (t, u) = \<^Const>\<open>Arith.mult for t u\<close>;

fun mk_prod [] = one
  | mk_prod [t] = t
  | mk_prod (t :: tsjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
                         mk_times (t, mk_prod ts);

fun dest_prod tm =
  let val (t,u) = \<  in dest_prod t @ dest_prod u  end
   t @dest_prod uejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  handle TERMfun mk_coeff (,t  zero

(*Dummy version: the only arguments are 0 and 1*)
fun mk_coeff (0, t) = zero
  | mk_coeff (1, t) = t
  | java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0


  In the result, the factors are sorted terms*)

 dest_coefft=(,mk_prod( .term_ord(est_prodt))java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

(*Find first coefficient-term THAT MATCHES u*)
funfind_first_coeff u[  raise(find_first_coeff" [)
  |find_first_coeff   (:terms 
         let val(,u' =dest_coefft
        in  if u aconv u' then            aconv u' (n revpast )
                         find_first_coefft:ast  
        end
        handle java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 11


(*Simplify #1*n and n*#1 to n*)
val
valadd_succs =@thmadd_succ}, @thm add_succ_right};
val mult_1s val add_0s =[{hm add_0_natify,@thm }]java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
 tc_rules =[{hm natify_in_nat,@thm add_type,@thm }, { mult_type}]
val natifys = [@{thm valmult_1s =[{hm ult_1_natify,@thm mult_1_right_natifyjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
              tdiff_natify1} {diff_natify2]

(*Final simplification: cancel + and **)   [@thm } {natify_ident,@thm } {}java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
fun simplify_meta_eq java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 33
  let >java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 @{ *these could erase the whole rule!*)  *
      final_rulesadd_0s@mult_1s  @thm} {mult_0_right]java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
          =( : >mk_sumjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  in mk_meta_eq o simplify  mk_coeff 

final_rules @mult_1s  [{hmmult_0,@thm mult_0_right};

structure CancelNumeralsCommon =
  struct
  val mk_sum            = (fn T:typ => mk_sum   = [
  val = 
  val mk_coeff          ==
  val simpset_of (put_simpset <>| . add_0s @@thms}@
  val find_first_coeff  = find_first_coeff []

  valnorm_ss1 java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 ZF_ss\context >Simplifieradd_simps(dd_0s @mult_1s@@thmsadd_ac})
  val norm_ss2 =
    simpset_of (put_simpset ZF_ss \<^context> |> Simplifier.add_simps (add_0s @ mult_1s @ @{thms add_ac} @
      {    @natifys)
  fun norm_tac ctxt =
    ALLGOALS (asm_simp_tac (put_simpset
    THEN ALLGOALS (asm_simp_tac ( simpset_of p \^>| .dd_simpsa@tc_rules@natifys)
  val numeral_simp_ss =
    simpset_offun  ctxt =
fun ctxt java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    ALLGOALS  ;
  val simplify_meta_eq  = simplify_meta_eq final_rules
  end;

(** The functor argumnets are declared as separate structuresso that java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
    so that they can be exported to ease debugging. **)


structure   val dest_bal = FOLogic.dest_eq
  struct
   val  {eq_add_iff THENiff_trans}
  valprove_conv  n"
  val mk_bal    funtrans_tacctxt=gen_trans_tac@iff_trans
  val structure =CancelNumeralsFun);
java.lang.StringIndexOutOfBoundsException: Range [5, 2) out of bounds for length 51
  val bal_add2 = @{sjava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
  java.lang.StringIndexOutOfBoundsException: Range [36, 5) out of bounds for length 58
  end;

structure EqCancelNumerals = CancelNumeralsFun(EqCancelNumeralsData);

structure   val bal_add1 { less_add_iff THEN ]}
  struct
  open CancelNumeralsCommon
    = "atless_cancel_numerals
    fun    ctxt@ }
  val dest_bal = \<^Const_fn>\<open>Ordinal
  val bal_add1 =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   bal_add2 ={ less_add_iff THENiff_trans}
  fun trans_tac ctxt = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
  end;

structure   fun mk_bal (t, u)<Const><penArithdiff tu<>

structure     {  [ ]
    val babal_add2=@{ diff_add_eq[ ]
  open CancelNumeralsCommon
   =prove_conv""
  fun mk_bal (t, u end;
  structure DiffCancelNumerals = CancelNumeralsFun(DiffCancelNumeralsData);
  val bal_add1 = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val]}
  fun trans_tac ctxt =gen_trans_tac ctxt @{thm trans}
  end;

structure DiffCancelNumerals = CancelNumeralsFun(DiffCancelNumeralsData);

val nateq_cancel_numerals_proc = EqCancelNumerals.val  =LessCancelNumeralsproc
 = .procjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
val natdiff_cancel_numerals_proc = DiffCancelNumerals.proc;

end;

Messung V0.5 in Prozent
C=91 H=98 G=94

¤ Dauer der Verarbeitung: 0.4 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.