Eine aufbereitete Darstellung der Quelle

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


Quelle  scm_1.abs   Sprache: Mizar

 

:: Development of Terminology for {\bf SCM}
::  by Grzegorz Bancerek and Piotr Rudnicki
::
:: Received October 8, 1993
:: Copyright (c) 1993-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies NUMBERS, INT_1, FINSEQ_1, FSM_1, AMI_3, PARTFUN1, AMI_1,
      EXTPRO_1, RELAT_1, FUNCT_1, CIRCUIT2, MSUALG_1, ARYTM_3, XXREAL_0,
      CARD_1, TARSKI, AFINSQ_1, ORDINAL4, GRAPHSP, ARYTM_1, SCM_1, STRUCT_0,
      RECDEF_2, FUNCT_4, CAT_1, GOBRD13, MEMSTR_0, NAT_1;
 notations TARSKI, XTUPLE_0, ORDINAL1, NUMBERS, XCMPLX_0, NAT_1, INT_1,
      RELAT_1, FUNCT_1, PARTFUN1, FINSEQ_1, XXREAL_0, AFINSQ_1, FUNCT_4,
      RECDEF_2, STRUCT_0, MEMSTR_0, COMPOS_1, EXTPRO_1, AMI_3;
 constructors AMI_3, RELSET_1, PRE_POLY, XTUPLE_0;
 registrations ORDINAL1, XXREAL_0, XREAL_0, NAT_1, INT_1, AMI_3, AFINSQ_1,
      RELAT_1, PBOOLE, FINSEQ_1, STRUCT_0, VALUED_0, FUNCT_4, COMPOS_0,
      XTUPLE_0, MEMSTR_0;
 requirements NUMERALS, REAL, SUBSET, BOOLE, ARITHM;


begin

reserve k, n, il for Nat;
reserve s for State of SCM;
reserve a, b, d for Data-Location;
reserve i1, i2, i3, i4 for Integer;

registration
 let i1 be Integer;
 cluster <%i1%> -> INT-valued;
 let i2 be Integer;
 cluster <%i1,i2%> -> INT-valued;
 let i3 be Integer;
 cluster <%i1,i2,i3%> -> INT-valued;
 let i4 be Integer;
 cluster <%i1,i2,i3,i4%> -> INT-valued;
end;

definition
  let D be XFinSequence of INT;
  mode State-consisting of D -> State of SCM means
:: SCM_1:def 1

   for k being Nat st k < len D holds it.dl.k = D.k;
end;

registration
  let D be XFinSequence of INT, il be Nat;
 cluster il-started for State-consisting of D;
end;

theorem :: SCM_1:1
  for s being il-started State-consisting of <%i1,i2,i3,i4%> holds
  s.dl.0 = i1 & s.dl.1 = i2 & s.dl.2 = i3 & s.dl.3 = i4;

theorem :: SCM_1:2
  for s being il-started State-consisting of <%i1,i2%> holds
  s.dl.0 = i1 & s.dl.1 = i2;

theorem :: SCM_1:3
  for I1, I2 being Instruction of SCM
  for F being total NAT-defined (the InstructionsF of SCM)-valued Function
   st <%I1%>^<%I2%> c= F
   holds F.0 = I1 & F.1 = I2;

reserve F for total NAT-defined (the InstructionsF of SCM)-valued Function;

theorem :: SCM_1:4
  IC Comput(F,s,k) = n & F.n = a := b implies
  IC Comput(F,s,k+1) = n+1 &
  Comput(F,s,k+1).a = Comput(F,s,k).b &
  for d st d <> a holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:5
  IC Comput(F,s,k) = n & F.n = AddTo(a,b) implies
  IC Comput(F,s,k+1) = n+1 &
  Comput(F,s,k+1).a = Comput(F,s,k).a + Comput(F,s,k).b &
  for d st d <> a holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:6
  IC Comput(F,s,k) = n & F.n = SubFrom(a,b) implies
  IC Comput(F,s,k+1) = n+1 &
  Comput(F,s,k+1).a = Comput(F,s,k).a - Comput(F,s,k).b &
  for d st d <> a holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:7
  IC Comput(F,s,k) = n & F.n = MultBy(a,b) implies
  IC Comput(F,s,k+1) = (n+1) &
  Comput(F,s,k+1).a = Comput(F,s,k).a * Comput(F,s,k).b &
  for d st d <> a holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:8
  IC Comput(F,s,k) = n & F.n = Divide(a,b) & a <> b implies
  IC Comput(F,s,k+1) = (n+1) &
  Comput(F,s,k+1).a = Comput(F,s,k).a div Comput(F,s,k).b &
  Comput(F,s,k+1).b = Comput(F,s,k).a mod Comput(F,s,k).b &
  for d st d <> a & d <> b holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:9
  IC Comput(F,s,k) = n & F.n = SCM-goto il implies
  IC Comput(F,s,k+1) = il &
  for d holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:10
  IC Comput(F,s,k) = n & F.n = a =0_goto il implies
  (Comput(F,s,k).a = 0 implies IC Comput(F,s,k+1) = il) &
  (Comput(F,s,k).a <> 0 implies IC Comput(F,s,k+1) = (n+1)) &
  for d holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:11
  IC Comput(F,s,k) = n & F.n = a >0_goto il implies
  (Comput(F,s,k).a > 0 implies IC Comput(F,s,k+1) = il) &
  (Comput(F,s,k).a <= 0 implies IC Comput(F,s,k+1) = n+1) &
  for d holds Comput(F,s,k+1).d = Comput(F,s,k).d;

theorem :: SCM_1:12
  (halt SCM)`1_3 = 0 &
  (for a, b being Data-Location holds (a := b)`1_3 = 1) &
  (for a, b being Data-Location holds (AddTo(a,b))`1_3 = 2) &
  (for a, b being Data-Location holds (SubFrom(a,b))`1_3 = 3) &
  (for a, b being Data-Location holds (MultBy(a,b))`1_3 = 4) &
  (for a, b being Data-Location holds (Divide(a,b))`1_3 = 5) &
  (for i being Nat holds (SCM-goto i)`1_3 = 6) &
  (for a being Data-Location, i being Nat
   holds (a =0_goto i)`1_3 = 7) &
  for a being Data-Location, i being Nat holds
   (a >0_goto i)`1_3 = 8;

theorem :: SCM_1:13
  s.dl.0 = i1 & s.dl.1 = i2 & s.dl.2 = i3 & s.dl.3 = i4 implies
  s is State-consisting of <%i1,i2,i3,i4%>;

:: Empty program

theorem :: SCM_1:14
  <%halt SCM%> c= F implies
  for s being 0-started State-consisting of <*>INT
   holds F halts_on s & LifeSpan(F,s) = 0 & Result(F,s) = s;

:: Assignment

theorem :: SCM_1:15
  <%dl.0 := dl.1%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
   holds F halts_on s & LifeSpan(F,s) = 1 & (Result(F,s)).dl.0 = i2 &
  for d being Data-Location st d <> dl.0 holds (Result(F,s)).d = s.d;

:: Adding two integers

theorem :: SCM_1:16
  <%AddTo(dl.0,dl.1)%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 & (Result(F,s)).dl.0 = i1 + i2 &
  for d being Data-Location st d <> dl.0 holds Result(F,s).d = s.d;

:: Subtracting two integers

theorem :: SCM_1:17
  <%SubFrom(dl.0,dl.1)%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%> holds F halts_on s
  & LifeSpan(F,s) = 1 & (Result(F,s)).dl.0 = i1 - i2 &
  for d being Data-Location st d <> dl.0 holds (Result(F,s)).d = s.d;

:: Multiplying two integers

theorem :: SCM_1:18
  <%MultBy(dl.0,dl.1)%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 & (Result(F,s)).dl.0 = i1 * i2 &
  for d being Data-Location st d <> dl.0 holds (Result(F,s)).d = s.d;

:: Dividing two integers

theorem :: SCM_1:19
  <%Divide(dl.0,dl.1)%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of  <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 &
  (Result(F,s)).dl.0 = i1 div i2 & (Result(F,s)).dl.1 = i1 mod i2 &
  for d being Data-Location st d<>dl.0 & d<>dl.1 holds (Result(F,s)).d = s.d;

:: Unconditional jump

theorem :: SCM_1:20
  <%SCM-goto 1%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 &
  for d being Data-Location holds (Result(F,s)).d = s.d;

:: Jump at zero

theorem :: SCM_1:21
  <%dl.0=0_goto 1%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 &
  for d being Data-Location holds (Result(F,s)).d = s.d;

:: Jump at greater than zero

theorem :: SCM_1:22
  <%dl.0>0_goto 1%>^<%halt SCM%> c= F implies
  for s being 0-started State-consisting of <%i1,i2%>
  holds F halts_on s & LifeSpan(F,s) = 1 &
  for d being Data-Location holds (Result(F,s)).d = s.d;

theorem :: SCM_1:23
 for s being State of SCM holds s is State-consisting of <*>INT;

Messung
CHZG
9210010097

¤ Dauer der Verarbeitung: 0.3 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,085
#Domains=862,274