src/HOL/ex/Hebrew.thy
author wenzelm
Tue, 20 Sep 2005 13:57:08 +0200
changeset 17506 f20e5c8433a4
parent 17414 c9e9d2a2fc72
child 24312 bb5ec06f7c7a
permissions -rw-r--r--
tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17414
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     1
(* -*- coding: utf-8 -*-  
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     3
    Author:     Makarius
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     4
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     5
Example theory involving Unicode characters (UTF-8 encoding) -- both
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     6
formal and informal ones.
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     7
*)
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
     8
17506
wenzelm
parents: 17414
diff changeset
     9
header {* A Hebrew theory *}
wenzelm
parents: 17414
diff changeset
    10
17414
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    11
theory Hebrew
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    12
imports Main
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    13
begin
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    14
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    15
text {* The Hebrew Alef-Bet (א-ב). *}
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    16
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    17
datatype alef_bet =
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    18
    Alef    ("א")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    19
  | Bet     ("ב")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    20
  | Gimel   ("ג")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    21
  | Dalet   ("ד")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    22
  | He      ("ה")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    23
  | Vav     ("ו")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    24
  | Zayin   ("ז")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    25
  | Het     ("ח")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    26
  | Tet     ("ט")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    27
  | Yod     ("י")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    28
  | Kaf     ("כ")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    29
  | Lamed   ("ל")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    30
  | Mem     ("מ")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    31
  | Nun     ("נ")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    32
  | Samekh  ("ס")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    33
  | Ayin    ("ע")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    34
  | Pe      ("פ")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    35
  | Tsadi   ("צ")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    36
  | Qof     ("ק")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    37
  | Resh    ("ר")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    38
  | Shin    ("ש")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    39
  | Tav     ("ת")
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    40
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    41
thm alef_bet.induct
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    42
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    43
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    44
text {* Interpreting Hebrew letters as numbers. *}
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    45
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    46
consts
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    47
  mispar :: "alef_bet => nat"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    48
primrec
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    49
  "mispar א = 1"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    50
  "mispar ב = 2"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    51
  "mispar ג = 3"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    52
  "mispar ד = 4"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    53
  "mispar ה = 5"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    54
  "mispar ו = 6"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    55
  "mispar ז = 7"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    56
  "mispar ח = 8"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    57
  "mispar ט = 9"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    58
  "mispar י = 10"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    59
  "mispar כ = 20"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    60
  "mispar ל = 30"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    61
  "mispar מ = 40"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    62
  "mispar נ = 50"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    63
  "mispar ס = 60"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    64
  "mispar ע = 70"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    65
  "mispar פ = 80"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    66
  "mispar צ = 90"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    67
  "mispar ק = 100"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    68
  "mispar ר = 200"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    69
  "mispar ש = 300"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    70
  "mispar ת = 400"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    71
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    72
thm mispar.simps
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    73
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    74
lemma "mispar ק + mispar ל + mispar ה = 135"
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    75
  by simp
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    76
c9e9d2a2fc72 The Hebrew Alef-Bet -- Unicode example;
wenzelm
parents:
diff changeset
    77
end