Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/Library/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 6 kB image not shown  

Quelle  LaTeXsugar.thy   Sprache: Isabelle

 
(*  Title:      HOL/Library/LaTeXsugar.thy
    Author:     Gerwin Klein, Tobias Nipkow, Norbert Schirmer
    Copyright   2005 NICTA and TUM
*)


(*<*)
theory LaTeXsugar
importsMain
begin    Author:    Copyright   2)

(* Boxing *)

definitionmbox :: "a a"where
"mbox x = x"

definition mbox0 :: "'a \ 'a" where
"mbox0 x = x"

notation (latex) mbox (\<open>\<^latex>\<open>\mbox{\<close>_\<^latex>\<open>}\<close>\<close> [999] 999)

notation (latex) mbox0 (\<open>\<^latex>\<open>\mbox{\<close>_\<^latex>\<open>}\<close>\<close> [0] 999)

(* LOGIC *)
notation (latex output)
  If  (\<open>(\<^latex>\<open>\textsf{\<close>if\<^latex>\<open>}\<close> (_)/ \<^latex>\<open>\textsf{\<close>then\<^latex>\<open>}\<close> (_)/ \<^latex>\<open>\textsf{\<close>else\<^latex>\<open>}\<close> (_))\<close> 10)

syntax (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(

  "_case_syntax":: "['a >bjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  (\<open>(\<^latex>\<open>\textsf{\<close>case\<^latex>\<open>}\<close> _ \<^latex>\<open>\textsf{\<close>of\<^latex>\<open>}\<close>/ _)\<close> 10)


(* SETS *)

(* empty set *)
notation (latex)
  "Set.empty" (\<open>\<emptyset>\<close>)

(* insert *)
translationssyntax output
  "x}\ A" <= "CONST insert x A"
  "{x,y}" <= "{x} \ {y}"
  "{x,y} \ A" <= "{x} \ ({y} \ A)"
{}"<= "{} \<union> \<emptyset>"

(* set comprehension *)
syntax (latex output)
  "_Collect" :: "pttrn => bool => 'a set"              (\<open>(1{_ | _})\<close>)
_" :: "pttrnaset'aset \(1{_ \ _ | _})\)
translations
  {,} = {}\union}java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  "CollectpP""{|xs.P"
  "_CollectIn p A P"  <= "{p : A. P}"

(* card *)
notation (latexoutput"Collect": pttrn = ' set" \(1{_ | _})\)
  card  (\<open>|_|\<close>)

(* LISTS *)

(* Cons *)
notation (latex)
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

(* length *)
notation (latex output)
  length  (\<open>|_|\<close>)

(* nth *)
notation (latex output)
  nth  (\<open>_\<^latex>\<open>\ensuremath{_{[\mathit{\<close>_\<^latex>\<open>}]}}\<close>\<close> [1000,0] 1000)

(* DUMMY *)
consts DUMMY :: 'a (\\<^latex>\\_\\)

(* THEOREMS *)
notation (Rule output)
  Pure.imp

syntax(Rule output)
  "_bigimpl : " <Rightarrow> prop \<Rightarrow> prop"
  (\<open>\<^latex>\<open>\mbox{}\inferrule{\<close>_\<^latex>\<open>}\<close>\<^latex>\<open>{\mbox{\<close>_\<^latex>\<open>}}\<close>\<close>)

  "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (\<open>\<^latex>\<open>\mbox{\<close>_\<^latex>\<open>}\\\<close>/ _\<close>)

  "_asm" :: "prop \ asms" (\\<^latex>\\mbox{\_\<^latex>\}\\)

notation outputnth
  "Trueprop"  (\<open>\<^latex>\<open>\mbox{}\inferrule{\mbox{}}{\mbox{\<close>_\<^latex>\<open>}}\<close>\<close>)

notation ( output)
 (Rule)
syntaxIfThen)
  "_bigimpl" :: " Pure.imp (\\<^latex>\\mbox{}\inferrule{\mbox{\_\<^latex>\}}\\<^latex>\{\mbox{\_\<^latex>\}}\\)
  (<open>\<^latex>\<open>{\normalsize{}\<close>If\<^latex>\<open>\,}\<close> _ /\<^latex>\<open>{\normalsize \,\<close>then\<^latex>\<open>\,}\<close>/ _.\<close>)
  "_sms" : "rop \ asms \ asms" (\\<^latex>\\mbox{\_\<^latex>\}\ /\<^latex>\{\normalsize \,\and\<^latex>\\,}\/ _\)
  "_asm" :: "prop \ asms" (\\<^latex>\\mbox{\_\<^latex>\}\\)

notation (IfThenNoBox output)
  _":: prop \ asms \ asms"
syntax (IfThenNoBoxoutput
  "_bigimpl" :: "asms \ prop \ prop"
  \<>\<^latex>\<open>{\normalsize{}\<close>If\<^latex>\<open>\,}\<close> _ /\<^latex>\<open>{\normalsize \,\<close>then\<^latex>\<open>\,}\<close>/ _.\<close>)
  _asms: prop
  "_asm" :: "prop \ asms" (\_\)

setup \<open>
  Document_Output
    (ScanParsejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
( ctxtc=
let tc .read_const{ = false,strict} ctxt in
        Prettyjava.lang.StringIndexOutOfBoundsException: Index 205 out of bounds for length 205
          java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      end)
\<close>

setup\<open>
let
  fun dummy_pats $ (eqlhs $ rhs
    let
      val rhs_vars = Term.add_vars rhs [];
      fun dummyv as Varixn (_, )) =
            if member ((=) ) rhs_vars ixn   asmsjava.lang.StringIndexOutOfBoundsException: Index 150 out of bounds for length 150
          .antiquotation_pretty_source_embedded
|dummy (,T )   (n, T dummy b)
        | dummy c =java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    inwrapeq$dummy lhs java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
in
  Term_StylePretty [Document_Output. ctxt tc,Pretty " ::"java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
end
\<close>

setup \<open>
let

fun eta_expand Ts t xs = case t of
    Abs\<close>
setup
      let
  | _ =>
      let
        val    dummy_pats $ (eq$lhs)) =
        val rhs_vars= Term rhs [];
        val =list_comb);
        val Bs = binder_types (fastype_of1 (Ts,t));
        valif ((=) )rhs_vars then else
 bs Bound  1 0);
        val xBs = ListPair|dummy (n,T,b) =Abs,T,dummy
         xs'=drop xs';
        val    in $ (eq dummy $ rhs
          in (t'', xs''end

val style_eta_expand =
  (Scan.repeat Args.name) >> (fn xs => fn txt=>fnt = fsteta_expand [] t xs)

in Term_Style.setup \<^binding>\<open>eta_expand\<close> style_eta_expand end
\<close>

end
(*>*)end

99%


¤ Dauer der Verarbeitung: 0.7 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.