final draft
authorlammich <lammich@in.tum.de>
Mon, 20 Aug 2018 11:01:37 +0200
changeset 69955 db5ebc272bcf
parent 69954 849f58791a05
child 69956 821d9a48fbd2
child 69958 06558f42dffa
final
SS18/Exercises/ex14.pdf
SS18/Exercises/exam/Q_Trie.thy
SS18/Exercises/exam/Q_Unique_SBN.thy
SS18/Exercises/exam/document/root.tex
SS18/Exercises/hwsubm/XLATE
SS18/Exercises/hwsubm/_addscores.gawk
SS18/Exercises/hwsubm/addscores.sh
SS18/Exercises/hwsubm/allscores.sh
SS18/Exercises/hwsubm/email.log
SS18/Exercises/hwsubm/hw03/eric.koepke@online.de/ex03.thy
SS18/Exercises/hwsubm/hw03/jonatan.juhas@tum.de/ha03.thy
SS18/Exercises/hwsubm/hw03/smith.nickh@gmail.com/HW03.thy
SS18/Exercises/hwsubm/hw13/Homework_13.mbox
SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/SENTMAIL
SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/hw13.thy
SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/msg-5282-2.txt
SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/msg-5282-3.html
SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/SENTMAIL
SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/hw13.thy
SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/msg-5282-1.txt
SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/SENTMAIL
SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/jonischkeit13.thy
SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/msg-5282-4.txt
SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/SENTMAIL
SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/hw13.thy
SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/msg-5282-5.txt
SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/msg-5282-6.html
SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/SENTMAIL
SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/hw13.thy
SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/msg-5282-7.txt
SS18/Exercises/hwsubm/hw13/extr.log
SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/SENTMAIL
SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/msg-5282-8.txt
SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/SENTMAIL
SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/ex13.thy
SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/msg-5282-10.html
SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/msg-5282-9.txt
SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/SENTMAIL
SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/msg-5282-11.txt
SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/msg-5282-12.html
SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/SENTMAIL
SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/msg-5282-13.txt
SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/msg-5282-14.html
SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/SENTMAIL
SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/hw13.thy
SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/msg-5282-15.txt
SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/msg-5282-16.html
SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/SENTMAIL
SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/msg-5282-17.txt
SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/SENTMAIL
SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/ex13.thy
SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/msg-5282-18.txt
SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/msg-5282-19.html
SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/SENTMAIL
SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/msg-5282-22.txt
SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/Home13.thy
SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/SENTMAIL
SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/msg-5282-20.txt
SS18/Exercises/hwsubm/hw13/meta.csv
SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/SENTMAIL
SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/msg-5282-21.txt
SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/SENTMAIL
SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/hw13.thy
SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/msg-5282-25.txt
SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/msg-5282-26.html
SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/SENTMAIL
SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/hw13tmpl.thy
SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/msg-5282-23.txt
SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/msg-5282-24.html
SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/HW13.thy
SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/SENTMAIL
SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/msg-5282-27.txt
SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/msg-5282-28.html
SS18/Exercises/hwsubm/proj/Project.mbox
SS18/Exercises/hwsubm/proj/a.putwattana@tum.de/DESCR
SS18/Exercises/hwsubm/proj/a.putwattana@tum.de/Fenwick_Trees_List.thy
SS18/Exercises/hwsubm/proj/a.putwattana@tum.de/msg-10418-2.txt
SS18/Exercises/hwsubm/proj/a.putwattana@tum.de/msg-10418-3.html
SS18/Exercises/hwsubm/proj/alexejrotar@gmail.com/DESCR
SS18/Exercises/hwsubm/proj/alexejrotar@gmail.com/ctl.thy
SS18/Exercises/hwsubm/proj/alexejrotar@gmail.com/msg-10418-1.txt
SS18/Exercises/hwsubm/proj/clemens.jonischkeit@yahoo.de/DESCR
SS18/Exercises/hwsubm/proj/clemens.jonischkeit@yahoo.de/jonischkeit.thy
SS18/Exercises/hwsubm/proj/clemens.jonischkeit@yahoo.de/msg-10418-4.txt
SS18/Exercises/hwsubm/proj/daniel.kutasi@outlook.de/DESCR
SS18/Exercises/hwsubm/proj/daniel.kutasi@outlook.de/Skew.thy
SS18/Exercises/hwsubm/proj/daniel.kutasi@outlook.de/msg-10418-5.txt
SS18/Exercises/hwsubm/proj/daniel.kutasi@outlook.de/msg-10418-6.html
SS18/Exercises/hwsubm/proj/eric.koepke@online.de/DESCR
SS18/Exercises/hwsubm/proj/eric.koepke@online.de/decisionTree3.thy
SS18/Exercises/hwsubm/proj/eric.koepke@online.de/msg-10418-7.txt
SS18/Exercises/hwsubm/proj/extr.log
SS18/Exercises/hwsubm/proj/felix.wielander@tum.de/DESCR
SS18/Exercises/hwsubm/proj/felix.wielander@tum.de/SparseMatrix.thy
SS18/Exercises/hwsubm/proj/felix.wielander@tum.de/SparseVector.thy
SS18/Exercises/hwsubm/proj/felix.wielander@tum.de/msg-10418-8.txt
SS18/Exercises/hwsubm/proj/florian.stamer@tum.de/DESCR
SS18/Exercises/hwsubm/proj/florian.stamer@tum.de/hw_original.thy
SS18/Exercises/hwsubm/proj/florian.stamer@tum.de/msg-10418-10.html
SS18/Exercises/hwsubm/proj/florian.stamer@tum.de/msg-10418-9.txt
SS18/Exercises/hwsubm/proj/ga53qud@mytum.de/DESCR
SS18/Exercises/hwsubm/proj/ga53qud@mytum.de/UnionFind.thy
SS18/Exercises/hwsubm/proj/ga53qud@mytum.de/msg-10418-11.txt
SS18/Exercises/hwsubm/proj/ga53qud@mytum.de/msg-10418-12.html
SS18/Exercises/hwsubm/proj/j.gottfriedsen@tum.de/DESCR
SS18/Exercises/hwsubm/proj/j.gottfriedsen@tum.de/arrow.thy
SS18/Exercises/hwsubm/proj/j.gottfriedsen@tum.de/msg-10418-13.txt
SS18/Exercises/hwsubm/proj/j.gottfriedsen@tum.de/msg-10418-14.html
SS18/Exercises/hwsubm/proj/j.v.mutius@gmail.com/DESCR
SS18/Exercises/hwsubm/proj/j.v.mutius@gmail.com/msg-10418-15.txt
SS18/Exercises/hwsubm/proj/j.v.mutius@gmail.com/sparse_matrices.thy
SS18/Exercises/hwsubm/proj/m.kirchmeier@tum.de/DESCR
SS18/Exercises/hwsubm/proj/m.kirchmeier@tum.de/FibHeap.thy
SS18/Exercises/hwsubm/proj/m.kirchmeier@tum.de/msg-10418-17.txt
SS18/Exercises/hwsubm/proj/martin.rau@tum.de/DESCR
SS18/Exercises/hwsubm/proj/martin.rau@tum.de/hw_original.thy
SS18/Exercises/hwsubm/proj/martin.rau@tum.de/msg-10418-16.txt
SS18/Exercises/hwsubm/proj/s.griebel@tum.de/DESCR
SS18/Exercises/hwsubm/proj/s.griebel@tum.de/fibonacci_heap.thy
SS18/Exercises/hwsubm/proj/s.griebel@tum.de/msg-10418-20.txt
SS18/Exercises/hwsubm/proj/s.griebel@tum.de/msg-10418-21.html
SS18/Exercises/hwsubm/proj/sabine.rieder@tum.de/DESCR
SS18/Exercises/hwsubm/proj/sabine.rieder@tum.de/Radix_Sort_f.thy
SS18/Exercises/hwsubm/proj/sabine.rieder@tum.de/msg-10418-18.txt
SS18/Exercises/hwsubm/proj/sabine.rieder@tum.de/msg-10418-19.html
SS18/Exercises/hwsubm/proj/smith.nickh@gmail.com/DESCR
SS18/Exercises/hwsubm/proj/smith.nickh@gmail.com/HW13_prefix_trie.thy
SS18/Exercises/hwsubm/proj/smith.nickh@gmail.com/msg-10418-22.txt
SS18/Exercises/hwsubm/proj/smith.nickh@gmail.com/msg-10418-23.html
SS18/Exercises/hwsubm/scores.ods
Binary file SS18/Exercises/ex14.pdf has changed
--- a/SS18/Exercises/exam/Q_Trie.thy	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/exam/Q_Trie.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -99,9 +99,9 @@
 done
 
 fun compressed :: "bt \<Rightarrow> bool" where
-"compressed (Lf _) = True" |
-"compressed (Nd (Lf bl) (Lf br)) = (bl \<noteq> br)" |
-"compressed t = True"
+"compressed (Lf _) \<longleftrightarrow> True" |
+"compressed (Nd (Lf bl) (Lf br)) \<longleftrightarrow> (bl \<noteq> br)" |
+"compressed (Nd l r) \<longleftrightarrow> compressed l \<and> compressed r"
 
 fun compress :: "bt \<Rightarrow> bt" where
 "compress (Lf b) = Lf b" |
--- a/SS18/Exercises/exam/Q_Unique_SBN.thy	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/exam/Q_Unique_SBN.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -78,7 +78,7 @@
   from snoc.prems obtain r\<^sub>2 s\<^sub>2 where [simp]: "xs\<^sub>2 = s\<^sub>2@[r\<^sub>2]"
     by (cases xs\<^sub>2 rule: rev_cases) auto
 
-  text \<open>The invariants also hold for the prefixes of the numbes, and the
+  text \<open>The invariants also hold for the prefixes of the numbers, and the
     ranks in the prefixes are bounded by the highest digit.\<close>
   from snoc.prems have "invar s\<^sub>1" "invar s\<^sub>2"
     and RANKS: "\<forall>r\<in>set s\<^sub>1. r<r\<^sub>1" "\<forall>r\<in>set s\<^sub>2. r<r\<^sub>2"
--- a/SS18/Exercises/exam/document/root.tex	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/exam/document/root.tex	Mon Aug 20 11:01:37 2018 +0200
@@ -78,7 +78,7 @@
 \begin{minipage}{15cm}
 \vspace*{2mm}
 \begin{enumerate}
-\item You may only use a pen/pencil, eraser, and one A4 sheets of notes to solve
+\item You may only use a pen/pencil, eraser, and one A4 sheet of notes to solve
   the exam. Switch off your mobile phones!
 \item Please write on the sheets of this exam. At the end of the exam, there
   are two extra sheets. If you need more sheets, ask the supervisors during the   exam.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/XLATE	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,25 @@
+martin.rau@tum.de Rau_Martin_martin.rau@tum.de
+eric.koepke@online.de Koepke_Eric_eric.koepke@tum.de
+m.kirchmeier@tum.de Kirchmeier_Maximilian_max.kirchmeier@tum.de
+a.putwattana@tum.de Putwattana_Attakorn_a.putwattana@tum.de
+sabine.rieder@tum.de Rieder_Sabine_sabine.rieder@tum.de
+daniel.kutasi@outlook.de Kutasi_Daniel_daniel.kutasi@mytum.de
+felix.wielander@tum.de Wielander_Felix_felix.wielander@tum.de
+markuswebel@gmail.com Webel_Markus_markus.webel@tum.de
+mitja.krebs@tum.de Krebs_Mitja_mitja.krebs@tum.de
+a.kutafina@tum.de Kutafina_Anastassiya_a.kutafina@tum.de
+j.gottfriedsen@tum.de Gottfriedsen_Jakob_j.gottfriedsen@tum.de
+s.griebel@tum.de Griebel_Simon_s.griebel@tum.de
+j.v.mutius@gmail.com Mutius_Joshua_ga96koz@mytum.de
+clemens.jonischkeit@yahoo.de Jonischkeit_Clemens_clemens.jonischkeit@tum.de
+omar.badramany@tum.de Elbadramany_Omar_omar.badramany@tum.de
+g.bidlingmaier@tum.de Bidlingmaier_Gunther_g.bidlingmaier@tum.de
+florian.stamer@tum.de Stamer_Florian_florian.stamer@tum.de
+alexejrotar@gmail.com Rotar_Alexej_ga59zew@mytum.de
+smith.nickh@gmail.com Smith_Nicholas_nick.smith@tum.de
+ga53qud@mytum.de Das_Sharma_Amartya_ga53qud@mytum.de
+katharinaluise.schmitt@tum.de Schmitt_Katharina_katharinaluise.schmitt@tum.de
+ge69kel@mytum.de Somasundaram_Arun_ge69kel@mytum.de
+ge72lic@mytum.de Pfeiffer_Marcus_ge72lic@mytum.de
+jonatan.juhas@tum.de Juhas_Jonatan_jonatan.juhas@tum.de
+odnoshivkin@me.com Mykola_Odnoshyvkin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/_addscores.gawk	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,45 @@
+#!/usr/bin/gawk -f
+
+$1 == "XLATE" {
+  xlate[$2]=$3
+}
+
+$1 == "SCORE" {
+  snum = $2
+  name = $3
+  score = $4
+  maxscore = $5
+  
+  if (name in xlate) name = xlate[name]
+  
+  scores[snum,name] = score
+  
+  if (!(snum in maxscores)) {
+    maxscores[snum] = maxscore
+    totalmax+=maxscore
+  } else if (maxscore != maxscores[snum]) {
+    print "WARNING: Diff maxscore: " snum "/" name " has " maxscore " vs. " maxscores[snum]
+  }
+ 
+  totalscores[name]+=score
+  
+}
+
+$1 == "SUBM" {
+  snum = $2
+  name = $3
+  if (name in xlate) name = xlate[name]
+
+  if (! ((snum,name) in scores)) {
+    print "WARNING: No score for " name " " snum
+  }
+  
+}
+
+
+END {
+  print "Name, Homework, Homework-Percent"
+  for (name in totalscores) {
+    print name ", " totalscores[name] ", " (totalscores[name] * 100 / totalmax)
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/addscores.sh	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+OUT=$(mktemp)
+
+sed -re 's/^/XLATE /' XLATE >>$OUT
+
+grep '(\*\* Score: ' -r --include *.thy | sed -re 's|/| |;s|/.*\.thy:.*:||;s|/| |;s/_[0-9]+ / /;s/^/SCORE /' >>$OUT
+
+find -path './*/*' -type d | sed -re 's/^\.//;s/_[0-9]+//;s|/| |g;s/^/SUBM/' >>$OUT
+
+cat $OUT | ./_addscores.gawk
+
+rm -rf $OUT
--- a/SS18/Exercises/hwsubm/allscores.sh	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/hwsubm/allscores.sh	Mon Aug 20 11:01:37 2018 +0200
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+echo "Use addscores.sh !"
+exit 1
+
 #  SHEETS="01 02 03 04 05 06 07 08 09 10 11 12 13"
 SHEETS="OR"
 
--- a/SS18/Exercises/hwsubm/email.log	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/hwsubm/email.log	Mon Aug 20 11:01:37 2018 +0200
@@ -565,3 +565,57 @@
 Do 12. Jul 16:04:46 CEST 2018
 /home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw12 ge69kel@mytum.de hw12_tmpl.thy
 OK
+Mo 16. Jul 16:06:03 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 alexejrotar@gmail.com hw13.thy
+OK
+Mo 16. Jul 16:06:03 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 a.putwattana@tum.de hw13.thy
+OK
+Mo 16. Jul 16:06:03 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 clemens.jonischkeit@yahoo.de jonischkeit13.thy
+OK
+Mo 16. Jul 16:06:03 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 daniel.kutasi@outlook.de hw13.thy
+OK
+Mo 16. Jul 16:06:03 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 eric.koepke@online.de hw13.thy
+OK
+Mo 16. Jul 16:06:04 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 felix.wielander@tum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:04 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 florian.stamer@tum.de ex13.thy
+OK
+Mo 16. Jul 16:06:04 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 ga53qud@mytum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 ge69kel@mytum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 j.gottfriedsen@tum.de hw13.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 j.v.mutius@gmail.com hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 katharinaluise.schmitt@tum.de ex13.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 martin.rau@tum.de Home13.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 mitja.krebs@tum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 m.kirchmeier@tum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 sabine.rieder@tum.de hw13tmpl.thy
+OK
+Mo 16. Jul 16:06:05 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 s.griebel@tum.de hw13.thy
+OK
+Mo 16. Jul 16:06:06 CEST 2018
+/home/lammich/lehre/FDS/Private/SS18/Exercises/hwsubm/_sendmail.py PASSWORD hw13 smith.nickh@gmail.com HW13.thy
+OK
--- a/SS18/Exercises/hwsubm/hw03/eric.koepke@online.de/ex03.thy	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/hwsubm/hw03/eric.koepke@online.de/ex03.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -1,4 +1,4 @@
-(** Score 7/10
+(** Score: 7/10
   hw1: ok
   hw2: No main lemmas proved, defs look ok
 
@@ -164,4 +164,4 @@
 lemma "sublist (bst_remdups_aux t xs) xs"
   apply (induction xs arbitrary: t)
    apply auto
-  sorry
\ No newline at end of file
+  sorry
--- a/SS18/Exercises/hwsubm/hw03/jonatan.juhas@tum.de/ha03.thy	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/hwsubm/hw03/jonatan.juhas@tum.de/ha03.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -1,4 +1,4 @@
-(** 5/10
+(** Score: 5/10
   hw1: Missing append-lemmas, reasonable-spec
   hw2: Def ok, wrong sublist spec, no main lemmas proved.
 
@@ -162,4 +162,4 @@
   apply (auto simp: bst_remdups_def)
   (* Something is missing here *)
   oops
-end
\ No newline at end of file
+end
--- a/SS18/Exercises/hwsubm/hw03/smith.nickh@gmail.com/HW03.thy	Fri Jul 13 20:34:42 2018 +0200
+++ b/SS18/Exercises/hwsubm/hw03/smith.nickh@gmail.com/HW03.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -1,4 +1,4 @@
-(** 6/10
+(** Score: 6/10
   hw1: ok
   hw2: insert-all; inorder solution, no main-lemmas proved.
     (The solution does not satisfy the sub list property)
@@ -145,4 +145,4 @@
 
 (* The proof is simple. the unique elements of xs should be a subset of the larger xs *)
 
-end
\ No newline at end of file
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/Homework_13.mbox	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,3067 @@
+From mitja.krebs@tum.de Thu Jul 12 13:00:54 2018
+Return-Path: <it-support@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ dozKI8A0R1vCUwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 13:00:54 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id EACB01C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 13:00:54 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 7CD5E1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 13:00:53
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ E632A1C0507; Thu, 12 Jul 2018 13:00:54 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id E3B091C0506; Thu, 12 Jul 2018 13:00:54 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id BFB4A1C0502 for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:00:54 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id B54A21C038B
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:00:54 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id B3A681C2DD0; Thu, 12 Jul 2018 13:00:54 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.2 required=7.0 tests=BAYES_00,RCVD_IN_DNSWL_MED
+ autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id B8E3D1C2DD2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:00:49 +0200 (CEST)
+Received: from rmail.zv.tum.de (mail.zv.tum.de [129.187.125.248]) (using
+ TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate
+ requested) by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id
+ AD5111C2DBD for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:00:44 +0200 (CEST)
+Message-ID: <-1687527553.1531393243610.JavaMail.javamailuser@localhost>
+Date: Thu, 12 Jul 2018 13:00:43 +0200 (CEST)
+From: Mitja Daniel Krebs <mitja.krebs@tum.de>
+Reply-To: Mitja Daniel Krebs <mitja.krebs@tum.de>
+To: lammich@in.tum.de
+Subject: [FDS] Homework 13
+Mime-Version: 1.0
+Content-Type: multipart/mixed;  boundary="----=_Part_0_409274085.1531393243602"
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+------=_Part_0_409274085.1531393243602
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Sehr geehrter Herr Dr. Lammich,
+
+anbei finden Sie meinen Lösungsvorschlag zur Hausaufgabe 13.
+
+Mit freundlichen Grüßen
+Mitja Krebs
+------=_Part_0_409274085.1531393243602
+Content-Type: application/octet-stream; name=hw13tmpl.thy
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=hw13tmpl.thy
+
+KCo8KikKdGhlb3J5IGh3MTN0bXBsCmltcG9ydHMgQ29tcGxleF9NYWluCmJlZ2luCigqPiopCgp0
+ZXh0IFw8b3Blbj5cSG9tZXdvcmt7QW1vcnRpemVkIENvbXBsZXhpdHl9ezEzLjA3LjIwMTh9Cgog
+IFRoaXMgaXMgYW4gb2xkIGV4YW0gcXVlc3Rpb24sIHdoaWNoIHdlIGhhdmUgY29udmVydGVkIHRv
+IGEgaG9tZXdvcmsgdG8KICBiZSBkb25lIHdpdGggSXNhYmVsbGUhClw8Y2xvc2U+Cgp0ZXh0IFw8
+b3Blbj5BIGBgc3RhY2sgd2l0aCBtdWx0aXBvcCcnIGlzIGEgbGlzdCB3aXRoIHRoZSBmb2xsb3dp
+bmcgdHdvIGludGVyZmFjZSBmdW5jdGlvbnM6XDxjbG9zZT4KCmZ1biBwdXNoIDo6ICInYSBcPFJp
+Z2h0YXJyb3c+ICdhIGxpc3QgXDxSaWdodGFycm93PiAnYSBsaXN0IiB3aGVyZQoicHVzaCB4IHhz
+ID0geCAjIHhzIgoKZnVuIHBvcCA6OiAibmF0IFw8UmlnaHRhcnJvdz4gJ2Egb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mlnaHRhcnJvdz4gaW50IiB3aGVyZQogICJcPFBoaT4geHMgPSBsZW5ndGgg
+eHMiCgpsZW1tYSBcPFBoaT5fbm9uX25lZzogIlw8UGhpPiB4cyBcPGdlPiAwIgogIGJ5IChzaW1w
+IGFkZDogXDxQaGk+X2RlZikKCmxlbW1hIFw8UGhpPl9pbml0OiAiXDxQaGk+IGluaXQgPSAwIgog
+IGJ5IChzaW1wIGFkZDogXDxQaGk+X2RlZiBpbml0X2RlZikKCmxlbW1hIGFfcHVzaDogInRfcHVz
+aCB4IHhzICsgXDxQaGk+IChwdXNoIHggeHMpIC0gXDxQaGk+IHhzID0gMiIKICBieSAoc2ltcCBh
+ZGQ6IFw8UGhpPl9kZWYgdF9wdXNoX2RlZikKCmxlbW1hIGFfcG9wOiAidF9wb3AgbiB4cyArIFw8
+UGhpPiAocG9wIG4geHMpIC0gXDxQaGk+IHhzID0gMCIKICBieSAoc2ltcCBhZGQ6IFw8UGhpPl9k
+ZWYgdF9wb3BfZGVmKQoKKCo8KikKZW5kCigqPiopCgoK
+------=_Part_0_409274085.1531393243602--
+
+
+From smith.nickh@gmail.com Thu Jul 12 12:39:20 2018
+Return-Path: <smith.nickh@gmail.com>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ uDMGGNgvR1tyEwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 12:39:20 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 613721C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 12:39:20 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id E95691E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 12:39:18
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 5D6441C0503; Thu, 12 Jul 2018 12:39:20 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 5AEEE1C0502; Thu, 12 Jul 2018 12:39:20 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 360591C04EC for <lammich@in.tum.de>; Thu, 12 Jul 2018 12:39:20 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 2BE481C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 12:39:20 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 2A4CC1C03CA; Thu, 12 Jul 2018 12:39:20 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-2.1 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,
+ RCVD_IN_MSPIKE_H2 autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 65FEE1C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 12:39:18 +0200 (CEST)
+Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com
+ [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
+ (128/128 bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 4B9E41C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 12:39:18 +0200 (CEST)
+Received: by mail-wr1-f45.google.com with SMTP id q10-v6so21183028wrd.4 for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 03:39:18 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
+ s=20161025; h=mime-version:from:date:message-id:subject:to;
+ bh=gvKHJlOiA1wVMolvMpmWkN6ym+BZmYKSxY/0eOEYOYY=;
+ b=omwr7Fglzhw7vnv54K2skvQQ0zadoa5cYKCW7rPE6SbcCGmkDBQd7QtKl65A0beorq
+ Pr7hOqR37SaeY1EEw+kBs+lh7VonROzLfmoReQaXUZVePe6aZerGQTMniMFRnH9IZ8BM
+ /qEc94Hy+ueo+5OwjAN386C06aPcNWDzGhIDniIAklzHoFblmX368lapX6Ei8furl5XA
+ H16WvPzELdansryiXqs7wN7rijAu1BXmpI2KwqyjoqJV1eoK7D1Q5OmdrDslDs4fYGwj
+ UcvD5hH5wXjbIsQ+ki53NhBZB0AndGOslg21ol6u6HCdLP1bxaMZD8CjARqHxcEPikMW BTFA==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
+ bh=gvKHJlOiA1wVMolvMpmWkN6ym+BZmYKSxY/0eOEYOYY=;
+ b=EaX0zgL/4VFyFAu5YwF/D7fzc8elVdzyGIyEYaz/O1gLJg9Jo0J2iqUkMvvJcObkgc
+ zHfK4wR2VvLwOhH0enMdKlvn0+hespMoOFjqYuPdHq1TIsRf21yNl9GaeTQiqwsGLGez
+ 1JMVAV4OvWiWoQQ1j9ZsH8qGB2VPsMHnbNXfU9GtUfivBxIPrGdGJWOY4g7CqEJmZu1J
+ k8daDx81Pu72TdE6sS5xAe1Dk4lq1NkiqH0QEmtKUh8eu2wzX3Ns5jCecVoKyVFamMs+
+ EWzx3LqbxAomPhvAmHNiUc0svjkrwakpqmbl51pLNsU02sPGTnVvFCNmVQVM1Ioj6CWn bKJw==
+X-Gm-Message-State:
+ AOUpUlH8T/tiAhffHy19gjaVx6j0bCU+DMGvhjSRo4MafzBIYP9HmWQD
+ ibua6d9YPY+sZHlixUR1vW1+Io/+XpFvcPD1ozk=
+X-Google-Smtp-Source:
+ AAOMgpcG48d4j3dQ034n+1RyJUfzjNzjzGoW1THLjZ5atnv1UJxQj6qT81CD8gKFvRZj4LxkYz4or4oqT4Qe9vpTwXI=
+X-Received: by 2002:adf:9025:: with SMTP id
+ h34-v6mr1411865wrh.123.1531391957626; Thu, 12 Jul 2018 03:39:17 -0700 (PDT)
+MIME-Version: 1.0
+Received: by 2002:adf:8911:0:0:0:0:0 with HTTP; Thu, 12 Jul 2018 03:38:57
+ -0700 (PDT)
+From: Nicholas Smith <smith.nickh@gmail.com>
+Date: Thu, 12 Jul 2018 12:38:57 +0200
+Message-ID: <CALgGdVEzA30Fj2EZuyY1RAq3ObokTZgCSte3LDvGvXTSBx=PGw@mail.gmail.com>
+Subject: [FDS] Homework 13
+To: Peter Lammich <lammich@in.tum.de>
+Content-Type: multipart/mixed; boundary="000000000000a598320570caf96e"
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--000000000000a598320570caf96e
+Content-Type: multipart/alternative; boundary="000000000000a5982e0570caf96c"
+
+
+--000000000000a5982e0570caf96c
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+Attached
+
+-- 
+Nicholas Smith
+(310) 291-0777
+
+--000000000000a5982e0570caf96c
+Content-Type: text/html; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+<div dir="ltr">Attached<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Nicholas Smith<br>(310) 291-0777</div>
+</div>
+
+--000000000000a5982e0570caf96c--
+
+--000000000000a598320570caf96e
+Content-Type: application/octet-stream; name="HW13.thy"
+Content-Disposition: attachment; filename="HW13.thy"
+Content-Transfer-Encoding: base64
+X-Attachment-Id: f_jjif763a0
+
+KCo8KikKdGhlb3J5IEhXMTMKaW1wb3J0cyBNYWluCmJlZ2luCigqPiopCgp0ZXh0IFw8b3Blbj5c
+SG9tZXdvcmt7QW1vcnRpemVkIENvbXBsZXhpdHl9ezEzLjA3LjIwMTh9CgogIFRoaXMgaXMgYW4g
+b2xkIGV4YW0gcXVlc3Rpb24sIHdoaWNoIHdlIGhhdmUgY29udmVydGVkIHRvIGEgaG9tZXdvcmsg
+dG8KICBiZSBkb25lIHdpdGggSXNhYmVsbGUhClw8Y2xvc2U+Cgp0ZXh0IFw8b3Blbj5BIGBgc3Rh
+Y2sgd2l0aCBtdWx0aXBvcCcnIGlzIGEgbGlzdCB3aXRoIHRoZSBmb2xsb3dpbmcgdHdvIGludGVy
+ZmFjZSBmdW5jdGlvbnM6XDxjbG9zZT4KCmZ1biBwdXNoIDo6ICInYSBcPFJpZ2h0YXJyb3c+ICdh
+IGxpc3QgXDxSaWdodGFycm93PiAnYSBsaXN0IiB3aGVyZQoicHVzaCB4IHhzID0geCAjIHhzIgoK
+ZnVuIHBvcCA6OiAibmF0IFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+ICdhIGxp
+c3QiIHdoZXJlCiJwb3AgbiB4cyA9IGRyb3AgbiB4cyIKCgp0ZXh0IFw8b3Blbj5Zb3UgbWF5IGFz
+c3VtZVw8Y2xvc2U+CgpkZWZpbml0aW9uIHRfcHVzaCA6OiAiJ2EgXDxSaWdodGFycm93PiAnYSBs
+aXN0IFw8UmlnaHRhcnJvdz4gbmF0IiB3aGVyZQoidF9wdXNoIHggeHMgPSAxIgoKZGVmaW5pdGlv
+biB0X3BvcCA6OiAibmF0IFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+IG5hdCIg
+d2hlcmUKInRfcG9wIG4geHMgPSBtaW4gbiAobGVuZ3RoIHhzKSIKCmRlZmluaXRpb24gcGhpIDo6
+ICInYSBsaXN0IFw8UmlnaHRhcnJvdz4gbmF0IiB3aGVyZQoicGhpIGFzID0gbGVuZ3RoKGFzKSIg
+KCpudW1iZXIgb2YgZWxlbWVudHMgaW4gdGhlIGxpc3QqKQoKbGVtbWEgcGhpX2luaXQ6ICJwaGkg
+W10gPSAwIgogIGJ5KHNpbXAgYWRkOiBwaGlfZGVmICkKCgpsZW1tYSBhX3B1c2g6ICIodF9wdXNo
+IHggeHMpICsgcGhpKHB1c2ggeCB4cykgLSAocGhpIHhzKSA9IDIiCiAgYXBwbHkgKGluZHVjdGlv
+biAgeHMgcnVsZTpwdXNoLmluZHVjdCkKYXBwbHkgKHNpbXBfYWxsIGFkZDogcGhpX2RlZiB0X3B1
+c2hfZGVmKQogIGRvbmUKCmxlbW1hIGFfcG9wOiAiKHRfcG9wIHggeHMpICsgcGhpKHBvcCB4IHhz
+KSAtIChwaGkgeHMpID0gMCIKICBhcHBseSAoaW5kdWN0aW9uICB4cyBydWxlOnB1c2guaW5kdWN0
+KQphcHBseSAoc2ltcF9hbGwgYWRkOiBwaGlfZGVmIHRfcG9wX2RlZikKZG9uZQoKCigqPCopCmVu
+ZAooKj4qKQoKCg==
+--000000000000a598320570caf96e--
+
+From alexejrotar@gmail.com Thu Jul 12 13:14:57 2018
+Return-Path: <alexejrotar@gmail.com>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ 5A2gIDE4R1sufAAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 13:14:57 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 845691C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 13:14:57 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 14EAA1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 13:14:56
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 804F41C0502; Thu, 12 Jul 2018 13:14:57 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 7DC671C04EC; Thu, 12 Jul 2018 13:14:57 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 5A19B1C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:14:57 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 4E2D81C03B1
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:14:57 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 4CAA31C03CA; Thu, 12 Jul 2018 13:14:57 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-2.0 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2
+ autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 314021C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:14:53 +0200 (CEST)
+Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com
+ [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
+ (128/128 bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 160E31C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:14:53 +0200 (CEST)
+Received: by mail-wr1-f46.google.com with SMTP id s11-v6so21284691wra.13
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 04:14:53 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
+ s=20161025; h=message-id:subject:from:to:date:mime-version;
+ bh=bQtClkD2yPJ1pnrZ8+Ru3/RJL61js5DVCvSoskv6+EM=;
+ b=nKtrWch7pq0dfSHPTZEDJczS67QugL5KrihqwLcsKJddPGafeS6oGd/34Bvbx3a4bp
+ zLm/NSl4qfciNrEe4gyOqDaoBCZjJljOM/OcSKsqdCeVBmdNPYrTFhlZlU/rOyDkra0O
+ pKX+sI2V71ByZ2YCSm02JGrZ3w5e2NY3wHZwCkZNFZEfCfZIsI/xihh8yIQeXiPopw0a
+ K7VgUf4vJkAHiARw1PE095PFOdIZ4zuLNLHaDb505eTx7XSI7MXjPJ49yxBrkybZn699
+ 43CzN6YOb+jp/PhJWFH8TdFkysSdPVwdEg+0GBx8qPS7o4AR4IKSuutrSs75FsiE6Mnp cxhw==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-gm-message-state:message-id:subject:from:to:date:mime-version;
+ bh=bQtClkD2yPJ1pnrZ8+Ru3/RJL61js5DVCvSoskv6+EM=;
+ b=QNDmR/SM5X3kDowj8QuXBAfGbri0KSkpFXWJM9B6L4Qz3NySSvkPHggLMmFEgiTXoQ
+ zWPClSvmAC5y3Yu5A1WqVRkpvjctAnfH7zlKpJhLs1mfpmamTw3QlFyVazv6B1hdX/Au
+ aLzEgmVBPhiVxBR/TlGSAvlAVpQeMsrOEY49iP6bCt4V6vwJufjS3wBBtDpJWvQivzCF
+ vUkdNJVC9DgSgwki0/2kIPXrwq0JdH4G+H3Ms+XR9V13qe82XvR7qPUtbB8xoZk0OWSN
+ vDmiJenGf961w6a02I/z3vfEskwobh2uLNDlLVNBgsPOQxCZ62jrA/df4Gd0XPdKGROR     
+ rsvQ==
+X-Gm-Message-State:
+ AOUpUlHSb01Texc0YVriy/8QQS5OAYoBFUHxdjhDUHmfGIC9HwkyZXPW
+ a1JXL7IZjKl2R/zSvKw9Yhh4YQDt
+X-Google-Smtp-Source:
+ AAOMgpc9vKmr1LkZWViCInimBPGIhDQTTUDe70g/WF7ptNcNwD5FEA8230d1NgyMh2O7mtvhMjpXDw==
+X-Received: by 2002:a5d:494c:: with SMTP id
+ r12-v6mr1423338wrs.66.1531394092501; Thu, 12 Jul 2018 04:14:52 -0700 (PDT)
+Received: from localhost.localdomain (client-8-72.eduroam.oxuni.org.uk.
+ [192.76.8.72]) by smtp.googlemail.com with ESMTPSA id
+ j131-v6sm5200613wmb.35.2018.07.12.04.14.51 for <lammich@in.tum.de>
+ (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12
+ Jul 2018 04:14:51 -0700 (PDT)
+Message-ID: <1531394091.1639.1.camel@gmail.com>
+Subject: [FDS] Homework 13
+From: Alexej Rotar <alexejrotar@gmail.com>
+To: lammich@in.tum.de
+Date: Thu, 12 Jul 2018 13:14:51 +0200
+Content-Type: multipart/mixed; boundary="=-+HigjVGQnZ1iu4kegL+L"
+X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) 
+Mime-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--=-+HigjVGQnZ1iu4kegL+L
+Content-Type: text/plain
+Content-Transfer-Encoding: 8bit
+
+
+
+--=-+HigjVGQnZ1iu4kegL+L
+Content-Disposition: attachment; filename="hw13.thy"
+Content-Type: text/plain; name="hw13.thy"; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+(*<*)
+theory hw13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+text \<open>The potential function is \<open>length::list \<Rightarrow> nat\<close>. The first two proof obligations for \<Phi> are then trivial:\<close>
+
+lemma "length xs \<ge> 0" by simp
+
+lemma "length [] = 0" by simp
+
+text \<open>The amortized costs for both functions are 2.\<close>
+
+lemma "t_push x xs + length (push x xs) - length xs \<le> 2"
+  by (induction xs) (auto simp: t_push_def)
+
+lemma "t_pop n xs + length (pop n xs) - length xs \<le> 2"
+  by (induction xs) (auto simp: t_pop_def)
+
+(*<*)
+end
+(*>*)
+
+
+
+--=-+HigjVGQnZ1iu4kegL+L--
+
+
+From m.kirchmeier@tum.de Thu Jul 12 13:47:23 2018
+Return-Path: <m.kirchmeier@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ 7iGMOMs/R1upWwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 13:47:23 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id E64691C202C
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 13:47:23 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 6AF2B1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 13:47:22
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ D71C71C04EC; Thu, 12 Jul 2018 13:47:23 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id D306C1C0506; Thu, 12 Jul 2018 13:47:23 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 91C951C0502 for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:47:18 +0200
+ (CEST)
+Received: from vmrbg98.informatik.tu-muenchen.de
+ (vmrbg98.informatik.tu-muenchen.de [131.159.0.123]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 855071C04EC
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:47:18 +0200 (CEST)
+Received: from webmail.in.tum.de (localhost [IPv6:::1]) by
+ vmrbg98.informatik.tu-muenchen.de (Postfix) with ESMTP id 7F7E640189 for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 13:47:18 +0200 (CEST)
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="=_b2f41331ebc23837b0bf99013271c5aa"
+Date: Thu, 12 Jul 2018 13:47:18 +0200
+From: Maximilian Kirchmeier <m.kirchmeier@tum.de>
+To: Peter Lammich <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Message-ID: <8fa90325a70d05121725aa2b2ca237e8@tum.de>
+X-Sender: m.kirchmeier@tum.de
+User-Agent: Roundcube Webmail/1.3.3
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--=_b2f41331ebc23837b0bf99013271c5aa
+Content-Type: text/plain; charset=UTF-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+Hallo Peter,
+
+anbei noch die Hausaufgabe.
+
+Viele Grüße
+Max
+--=_b2f41331ebc23837b0bf99013271c5aa
+Content-Type: text/plain; name=hw13tmpl.thy
+Content-Disposition: attachment; filename=hw13tmpl.thy; size=2696
+Content-Transfer-Encoding: 8bit
+
+(*<*)
+theory hw13tmpl
+imports Complex_Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+"init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> xs = length xs"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+by(simp add: \<Phi>_def init_def)
+
+lemma a_push: "t_push x xs + \<Phi>(push x xs) - \<Phi> xs = 2"
+  by (induction xs) (simp_all add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n xs + \<Phi>(pop n xs) - \<Phi> xs = 0"
+  by (induction xs) (simp_all add: \<Phi>_def t_pop_def)
+
+datatype 'a opr = PUSH 'a | POP nat
+
+fun execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> 'a list" where
+  "execute xs [] = xs"
+| "execute xs (PUSH x # ops) = execute (push x xs) ops"
+| "execute xs (POP n # ops) = execute (pop n xs) ops"
+  
+fun t_execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> nat" where
+  "t_execute xs [] = 0"
+| "t_execute xs (PUSH x # ops) = t_push x xs + t_execute (push x xs) ops"
+| "t_execute xs (POP n # ops) = t_pop n xs + t_execute (pop n xs) ops"
+
+lemmas [simp del] = push.simps pop.simps
+
+lemma t_execute_aux: "t_execute xs ops \<le> 2*length ops + \<Phi> xs - \<Phi> (execute xs ops)"
+proof (induction xs ops rule: execute.induct)
+  case (1 xs)
+  then show ?case by simp
+next
+  case (2 xs x ops)
+  then show ?case using a_push[of x xs] by simp
+next
+  case (3 xs n ops)
+  then show ?case using a_pop[of n xs] by simp 
+qed
+
+lemma t_execute: "t_execute init ops \<le> 2*length ops"    
+  using t_execute_aux[of init ops] \<Phi>_non_neg[of "execute init ops"] 
+  by (auto simp: \<Phi>_init)
+
+(*<*)
+end
+(*>*)
+
+
+
+--=_b2f41331ebc23837b0bf99013271c5aa--
+
+From a.putwattana@tum.de Thu Jul 12 14:32:09 2018
+Return-Path: <a.putwattana@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ jfnvGzpKR1sZawAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 14:32:09 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 142B71C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 14:32:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 906C31E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 14:32:07
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 0F2711C03B6; Thu, 12 Jul 2018 14:32:09 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 0C7B71C0502; Thu, 12 Jul 2018 14:32:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id DB0E71C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:08 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id D0A981C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:08 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id CF2811C03C9; Thu, 12 Jul 2018 14:32:08 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 333271C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:06 +0200 (CEST)
+Received: from postout1.mail.lrz.de (postout1.mail.lrz.de
+ [129.187.255.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 291E71C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:06 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41RFgV0n3szySf for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:06 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531398725;
+ bh=7AzZjJLAHf+Tg0n97ix7y30MXSnk635Yqb/g8fWGs7I=; b=ABuIaUkiiBWd
+ UWRMgY9tO4+lIiW5D/6PKZn8/pvsXObRAKuDxA1q5yyGYJkqStn0n/dRJ5HDJgLt
+ g+Yn60ccX4h5pMJYyeMiSZYdLzuRvk+cfiJ3/DdkLbaY4kpxiJPxuP845lt8AxfC
+ SK2xU+t1msSp+mBrrozM4uNG/rS+FwEOFkK8amgBQq+zub++Y9xyBcppsWuD4+EN
+ WQMeAKZQTZmnkMkZ8AdAeuxk+SH4yTkiE0T+U2w2KmF26o3EOXarRDKCXtPmy20l
+ vVQKRw7iAt2ZsGAc+Khha18mpga/oc3V0lM/aRmP5nrRwP7AxWh/F/1M6r7QcPTQ
+ 0PtvpN2Y6g==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ 2AlulPaKeVnt for <lammich@in.tum.de>; Thu, 12 Jul 2018 14:32:05 +0200 (CEST)
+Received: from BADWLRZ-SWMBX02.ads.mwn.de (BADWLRZ-SWMBX02.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::158]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX02",
+ Issuer "BADWLRZ-SWMBX02" (not verified)) by postout1.mail.lrz.de (Postfix)
+ with ESMTPS id 41RFgT5XppzySt for <lammich@in.tum.de>; Thu, 12 Jul 2018
+ 14:32:05 +0200 (CEST)
+Received: from BADWLRZ-SWMBX07.ads.mwn.de (2001:4ca0:0:108::163) by
+ BADWLRZ-SWMBX02.ads.mwn.de (2001:4ca0:0:108::158) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Thu, 12 Jul 2018 14:32:04 +0200
+Received: from BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70]) by
+ BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70%13]) with mapi id
+ 15.01.1531.003; Thu, 12 Jul 2018 14:32:04 +0200
+From: "Putwattana, Attakorn" <a.putwattana@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGducyZfAD1Smj0KUA9i/8QGh4Q==
+Date: Thu, 12 Jul 2018 12:32:04 +0000
+Message-ID: <8800f66f47804c07b0c38d90b6e898b0@tum.de>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX07.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [95.157.24.178]
+Content-Type: multipart/mixed; boundary="_004_8800f66f47804c07b0c38d90b6e898b0tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_8800f66f47804c07b0c38d90b6e898b0tumde_
+Content-Type: multipart/alternative; boundary="_000_8800f66f47804c07b0c38d90b6e898b0tumde_"
+
+
+--_000_8800f66f47804c07b0c38d90b6e898b0tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Dr. Peter Lammich,
+
+
+This is my solution to homework 13.
+
+
+Best regards,
+
+Attakorn Putwattana
+
+--_000_8800f66f47804c07b0c38d90b6e898b0tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear Dr. Peter Lammich,</p>
+<p><br>
+</p>
+<p>This is my solution to homework 13.</p>
+<p><br>
+</p>
+<p>Best regards,</p>
+<p>Attakorn Putwattana</p>
+</div>
+</body>
+</html>
+
+--_000_8800f66f47804c07b0c38d90b6e898b0tumde_--
+
+--_004_8800f66f47804c07b0c38d90b6e898b0tumde_
+Content-Type: application/octet-stream; name="hw13.thy"
+Content-Description: hw13.thy
+Content-Disposition: attachment; filename="hw13.thy"; size=1680; creation-date="Thu, 12 Jul 2018 12:26:50 GMT"; modification-date="Thu, 12 Jul 2018 12:26:50 GMT"
+Content-Transfer-Encoding: base64
+
+KCo8KikKdGhlb3J5IGh3MTMKaW1wb3J0cyBDb21wbGV4X01haW4KYmVnaW4KKCo+KikKCnRleHQg
+XDxvcGVuPlxIb21ld29ya3tBbW9ydGl6ZWQgQ29tcGxleGl0eX17MTMuMDcuMjAxOH0KCiAgVGhp
+cyBpcyBhbiBvbGQgZXhhbSBxdWVzdGlvbiwgd2hpY2ggd2UgaGF2ZSBjb252ZXJ0ZWQgdG8gYSBo
+b21ld29yayB0bwogIGJlIGRvbmUgd2l0aCBJc2FiZWxsZSEKXDxjbG9zZT4KCnRleHQgXDxvcGVu
+PkEgYGBzdGFjayB3aXRoIG11bHRpcG9wJycgaXMgYSBsaXN0IHdpdGggdGhlIGZvbGxvd2luZyB0
+d28gaW50ZXJmYWNlIGZ1bmN0aW9uczpcPGNsb3NlPgoKZnVuIHB1c2ggOjogIidhIFw8UmlnaHRh
+cnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+ICdhIGxpc3QiIHdoZXJlC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EgbGlzdCBcPFJpZ2h0YXJyb3c+IGludCIgd2hlcmUKICAiXDxQaGk+IGJzID0gbGVu
+Z3RoIGJzIgoKbGVtbWEgXDxQaGk+X25vbl9uZWc6ICJcPFBoaT4gYnMgXDxnZT4gMCIKYnkoc2lt
+cCBhZGQ6IFw8UGhpPl9kZWYpCgpsZW1tYSBcPFBoaT5faW5pdDogIlw8UGhpPiBbXSA9IDAiCmJ5
+KHNpbXAgYWRkOiBcPFBoaT5fZGVmKQoKbGVtbWEgYV9wdXNoIDogInRfcHVzaCB4IGJzICsgXDxQ
+aGk+IChwdXNoIHggYnMpIC0gXDxQaGk+IGJzID0gMiIKICB1bmZvbGRpbmcgdF9wdXNoX2RlZiBc
+PFBoaT5fZGVmCiAgYXBwbHkgKGluZHVjdGlvbiB4IGJzIHJ1bGU6IHB1c2guaW5kdWN0KQogIGFw
+cGx5IChzaW1wKQogIGRvbmUKCmxlbW1hIGFfcG9wIDogInRfcG9wIG4gYnMgKyBcPFBoaT4gKHBv
+cCBuIGJzKSAtIFw8UGhpPiBicyA9IDAiCiAgdW5mb2xkaW5nIHRfcG9wX2RlZiBcPFBoaT5fZGVm
+CiAgYXBwbHkgKGluZHVjdGlvbiBuIGJzIHJ1bGU6IHBvcC5pbmR1Y3QpCiAgYXBwbHkgKHNpbXAp
+CiAgZG9uZQoKKCo8KikKZW5kCigqPiopCgoK
+
+--_004_8800f66f47804c07b0c38d90b6e898b0tumde_--
+
+From sabine.rieder@tum.de Thu Jul 12 15:29:14 2018
+Return-Path: <sabine.rieder@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ /BOZEn1XR1u7GgAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 15:29:14 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 692EF1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 15:29:14 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id E10771E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 15:29:12
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 655141C03B6; Thu, 12 Jul 2018 15:29:14 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 62F441C04EA; Thu, 12 Jul 2018 15:29:14 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 3DCF51C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:14 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 336241C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:14 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 31E561C2DD5; Thu, 12 Jul 2018 15:29:14 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id 6E9A41C2DD0
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:12 +0200 (CEST)
+Received: from postout1.mail.lrz.de (postout1.mail.lrz.de
+ [129.187.255.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id 638521C2DBD
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:12 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41RGxN2VBDzyWN for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:12 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531402152;
+ bh=8QphYWCOXeEwDjgdvLHjREmidRShvh6+nzAMSFChdr0=; b=ycLDm2emxwqM
+ tkPmF49vghswDaCUmqPYBxalcFZ2o2Wb5KHS57aCgsO9zgu+jKOSIFHzEtoZyX+D
+ MqN4uA/h3nnkR8GInWp1OQHW93C0iN6eqwQX+heTdql8qcVEIIrGBGlXv495Ga7A
+ Ype31gytIfw3TVi2KvYI2ZcqmzTRhb3y0x1oJO0VShLYC3jflmGQCml18UTx7S5S
+ m36+OAUUGUGl9mcBs4Y4C0hR/mIAcDTGgjpbZYYeEm5lbu89bT8ByrrStEBMPBJO
+ ENNosFviGYV3bblwPPJwndwqg47vaZCrSGJqpcWo/zHo34y1C8L+wK/VhyUDoElp
+ QEaAJq6eHw==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ bBNoESeexoFj for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:29:12 +0200 (CEST)
+Received: from BADWLRZ-SWMBX02.ads.mwn.de (BADWLRZ-SWMBX02.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::158]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX02",
+ Issuer "BADWLRZ-SWMBX02" (not verified)) by postout1.mail.lrz.de (Postfix)
+ with ESMTPS id 41RGxN0dnJzyVF for <lammich@in.tum.de>; Thu, 12 Jul 2018
+ 15:29:12 +0200 (CEST)
+Received: from BADWLRZ-SWMBX09.ads.mwn.de (2001:4ca0:0:108::165) by
+ BADWLRZ-SWMBX02.ads.mwn.de (2001:4ca0:0:108::158) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Thu, 12 Jul 2018 15:29:10 +0200
+Received: from BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c]) by
+ BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c%12]) with mapi id
+ 15.01.1531.003; Thu, 12 Jul 2018 15:29:10 +0200
+From: "Rieder, Sabine" <sabine.rieder@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGeQvzrU0PZf29UWTy0+BHquYRA==
+Date: Thu, 12 Jul 2018 13:29:10 +0000
+Message-ID: <664e6202c3c54b5a866d20225e28b9f0@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX09.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [80.135.173.220]
+Content-Type: multipart/mixed; boundary="_004_664e6202c3c54b5a866d20225e28b9f0tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_664e6202c3c54b5a866d20225e28b9f0tumde_
+Content-Type: multipart/alternative; boundary="_000_664e6202c3c54b5a866d20225e28b9f0tumde_"
+
+
+--_000_664e6202c3c54b5a866d20225e28b9f0tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Peter,
+
+Please find homework 13 arrached.
+
+
+Best regards,
+
+Sabine Rieder
+
+--_000_664e6202c3c54b5a866d20225e28b9f0tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear Peter,</p>
+<p>Please find homework 13 arrached.</p>
+<p><br>
+</p>
+<p>Best regards,</p>
+<p>Sabine Rieder<br>
+</p>
+</div>
+</body>
+</html>
+
+--_000_664e6202c3c54b5a866d20225e28b9f0tumde_--
+
+--_004_664e6202c3c54b5a866d20225e28b9f0tumde_
+Content-Type: application/octet-stream; name="hw13tmpl.thy"
+Content-Description: hw13tmpl.thy
+Content-Disposition: attachment; filename="hw13tmpl.thy"; size=2095; creation-date="Thu, 12 Jul 2018 13:29:02 GMT"; modification-date="Thu, 12 Jul 2018 13:29:02 GMT"
+Content-Transfer-Enc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GVuZ3Ro
+IGxzKSIgYnkgc2ltcA0KICBhbHNvIGhhdmUgIi4uLiA9IDErMSIgYnkgYXV0bw0KICBmaW5hbGx5
+IHNob3cgP3RoZXNpcyBieSBhdXRvDQpxZWQNCigqYnkgKGF1dG8gc2ltcCBhZGQ6IHRfcHVzaF9k
+ZWYpKikNCg0KbGVtbWEgInRfcG9wIHggbHMgKyBcPFBoaT4gKHBvcCB4IGxzKSAtIFw8UGhpPiBs
+cyA9IDAiIA0KcHJvb2YgLQ0KICBoYXZlICJ0X3BvcCB4IGxzICsgXDxQaGk+IChwb3AgeCBscykg
+LSBcPFBoaT4gbHMgPSBtaW4geCAobGVuZ3RoIGxzKSArIFw8UGhpPiAocG9wIHggbHMpIC0gXDxQ
+aGk+IGxzIiBieSAoYXV0byBzaW1wIGFkZDogdF9wb3BfZGVmKQ0KICBhbHNvIGhhdmUgIi4uLiA9
+IG1pbiB4IChsZW5ndGggbHMpICsgKGxlbmd0aCBscyAtIG1pbiB4IChsZW5ndGggbHMpKSAtIChs
+ZW5ndGggbHMpIiBieSBzaW1wICgqbGVtbWEgb24gKGxlbmd0aCAoZHJvcCBuIGxzKSkgbmVlZGVk
+KikNCiAgZmluYWxseSBzaG93ID90aGVzaXMgYnkgYXV0bw0KcWVkDQooKmJ5KGF1dG8gc2ltcCBh
+ZGQ6IHRfcG9wX2RlZikqKQ0KDQooKjwqKQ0KZW5kDQooKj4qKQ0KDQoNCg==
+
+--_004_664e6202c3c54b5a866d20225e28b9f0tumde_--
+
+From martin.rau@tum.de Thu Jul 12 16:21:58 2018
+Return-Path: <martin.rau@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ mFiWEn1jR1soMAAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 16:21:58 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id A66AF1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 16:21:58 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 24CEB1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 16:21:57
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ A26F21C03B6; Thu, 12 Jul 2018 16:21:58 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 9F90A1C04EA; Thu, 12 Jul 2018 16:21:58 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 7B5A91C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:21:58 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 70E5E1C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:21:58 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 6F90C1C03C7; Thu, 12 Jul 2018 16:21:58 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED autolearn=no autolearn_force=no
+ version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 8C10C1C03C8
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:21:56 +0200 (CEST)
+Received: from forwout1.mail.lrz.de (forwout1.mail.lrz.de
+ [129.187.255.130]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 818491C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:21:56 +0200 (CEST)
+Received: from postforw1.mail.lrz.de (lxmhs61.srv.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:63d]) by forwout1.mail.lrz.de (Postfix) with
+ ESMTP id 41RJ6D3Q6DzCV for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:21:56
+ +0200 (CEST)
+Received: from postout1.mail.lrz.de (lxmhs51.srv.lrz.de [10.156.6.64]) by
+ postforw1.mail.lrz.de (Postfix) with ESMTP id 41RJ6D3JP9zyVj for
+ <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:21:56 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41RJ6D37HnzyV5 for
+ <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:21:56 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ content-language:content-type:content-type:mime-version
+ :user-agent:date:date:message-id:subject:subject:from:from
+ :received:received; s=postout; t=1531405316; bh=uPJuBb9SgYiYD07S
+ pqZs9p8LeQ+nVtfIEbep2koeXDk=; b=wQ9X7BTZiLowMKP3/44ld9S5soWEqe4/
+ nw7NNH3RbrkpgGNwDWNVA89Ke3SJcX0IlTzpyHovACKiLozNbX47ifDMB4/prAUf
+ bjKws0y/bXi0EIfHDmyXJbb2HLyVfWx3GOFwNbSzwgHgeNKWU3P05jaRt5ZAoBtu
+ RjulWi+6oihniHzYzne2ffX1y4z+Md9For4hs2cAwSZI7iv+vhD1q1F+l9Ft7F3/
+ WFLNgpSvPyuevp5zyWlshDcj55NIVorVKBEZrVkgDwQtNbonGjUUg4feur5Jyelr
+ QU55ZLk44PDrTEcE1JDeGnWQ9pM2y/LOKKP80rau55JtKSu9giqC5Q==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ io-qUofP08Ch for <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:21:56 +0200
+ (CEST)
+Received: from [IPv6:2a02:810d:4240:1778:d91c:ea06:b115:a1d0] (unknown
+ [IPv6:2a02:810d:4240:1778:d91c:ea06:b115:a1d0]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate
+ requested) by postout1.mail.lrz.de (Postfix) with ESMTPSA id 41RJ6C6QhFzyTZ
+ for <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:21:55 +0200 (CEST)
+To: peter.lammich@tum.de
+From: Martin Rau <martin.rau@tum.de>
+Subject: [FDS] Homework 13
+Message-ID: <eb343b95-3ca7-480f-0965-506467616e9c@tum.de>
+Date: Thu, 12 Jul 2018 16:21:46 +0200
+User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
+ Thunderbird/52.8.0
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------CA4E61A060E2345A0501BDD1"
+Content-Language: en-US
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+This is a multi-part message in MIME format.
+--------------CA4E61A060E2345A0501BDD1
+Content-Type: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+
+
+--------------CA4E61A060E2345A0501BDD1
+Content-Type: text/plain; charset=UTF-8; name="Home13.thy"
+Content-Disposition: attachment; filename="Home13.thy"
+Content-Transfer-Encoding: 8bit
+
+theory Home13
+imports Main
+begin
+
+(* Homework 13 Amortized Complexity *)
+
+definition init :: "'a list" where
+  "init = []"
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+  "push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+  "pop n xs = drop n xs"
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+  "t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+  "t_pop n xs = min n (length xs)"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> xs = length xs"
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by (simp add: \<Phi>_def init_def)
+
+lemma \<Phi>_non_neg: "\<Phi> s \<ge> 0"
+  by simp
+
+lemma a_push: "t_push x s + \<Phi>(push x s) - \<Phi> s = 2"
+  by (cases s) (auto simp add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n s + \<Phi>(pop n s) - \<Phi> s = 0"
+  by (cases s) (auto simp add: \<Phi>_def t_pop_def)
+
+datatype 'a opr = PUSH 'a | POP nat    
+    
+fun execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> 'a list" where
+  "execute s [] = s"
+| "execute s (PUSH x # ops) = execute (push x s) ops"  
+| "execute s (POP n # ops) = execute (pop n s) ops"  
+  
+fun t_execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> nat" where
+  "t_execute s [] = 0"
+| "t_execute s (PUSH x # ops) = t_push x s + t_execute (push x s) ops"
+| "t_execute s (POP n # ops) = t_pop n s + t_execute (pop n s) ops"
+
+lemma a_push': "t_push x s = 2 + \<Phi> s - \<Phi>(push x s)"
+  by (cases s) (auto simp add: \<Phi>_def t_push_def)
+
+lemma a_pop': "t_pop n s = \<Phi> s - \<Phi> (pop n s)"
+  by (cases s) (auto simp add: \<Phi>_def t_pop_def)
+
+lemma aux1: "\<Phi> (execute s ops) \<le> 2 * length ops + \<Phi> s"
+  by (induction s ops rule: execute.induct) (auto simp add: \<Phi>_def)
+
+lemma aux2: "\<Phi> (push x s) \<le> 2 + \<Phi> s"
+  by (induction s) (auto simp add: \<Phi>_def)
+
+lemma aux3: "\<Phi> (pop n s) \<le> \<Phi> s"
+  by (induction s) (auto simp add: \<Phi>_def)
+
+lemmas [simp del] = push.simps pop.simps
+
+lemma t_execute_aux: "t_execute s ops \<le> 2 * length ops + \<Phi> s - \<Phi> (execute s ops)"
+proof (induction s ops rule: execute.induct)
+  case (1 s)
+  then show ?case by simp
+next
+  case (2 s x ops)
+  have "t_execute s (PUSH x # ops) = t_push x s + t_execute (push x s) ops" 
+    by simp
+  also have "... \<le> t_push x s + (2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops))"
+    using 2 by simp
+  also have "... = (2 + \<Phi> s - \<Phi> (push x s)) + (2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops))"
+    using a_push' by simp
+  also have "... = 2 + \<Phi> s - \<Phi> (push x s) + 2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops)"
+    using aux1 by (simp add: aux1 add.assoc)
+  also have "... = 2 + 2 * length ops + \<Phi> s - \<Phi> (execute (push x s) ops)"
+    using aux2 by (metis le_add_diff_inverse2 semiring_normalization_rules(23))
+  also have "... = 2 * length (PUSH x # ops) + \<Phi> s - \<Phi> (execute s (PUSH x # ops))"
+    by simp
+  finally show ?case .
+next
+  case (3 s n ops)
+  have "t_execute s (POP n # ops) = t_pop n s + t_execute (pop n s) ops"
+    by simp
+  also have "... \<le> t_pop n s + (2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops))"
+    using 3 by simp
+  also have "... = (\<Phi> s - \<Phi> (pop n s)) + (2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops))"
+    using a_pop' by simp
+  also have "... = \<Phi> s - \<Phi> (pop n s) + 2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops)"
+    by (simp add: aux1 semiring_normalization_rules(21))
+  also have "... = 2 * length ops + \<Phi> s - \<Phi> (execute (pop n s) ops)"
+    using aux3 by (metis diff_add semiring_normalization_rules(23) semiring_normalization_rules(24))
+  also have "... \<le> 2 * length (POP n # ops) + \<Phi> s - \<Phi> (execute s (POP n # ops))"
+    by simp
+  finally show ?case .
+qed
+   
+lemma t_execute: "t_execute init ops \<le> 2 * length ops"    
+  using t_execute_aux[of init ops] \<Phi>_non_neg[of "execute init ops"]
+  by (simp add: \<Phi>_init)
+
+end
+--------------CA4E61A060E2345A0501BDD1--
+
+From j.v.mutius@gmail.com Thu Jul 12 16:28:57 2018
+Return-Path: <j.v.mutius@gmail.com>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ hrHOOotlR1vBSwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 16:28:57 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 550BF1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 16:28:57 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id B3A521E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 16:28:55
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 3D8241C03B6; Thu, 12 Jul 2018 16:28:57 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 3B1F21C04EC; Thu, 12 Jul 2018 16:28:57 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 15CA61C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:28:57 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 0B1651C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:28:57 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 0988F1C03C7; Thu, 12 Jul 2018 16:28:56 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-2.0 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 1CBFB1C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:28:55 +0200 (CEST)
+Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com
+ [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
+ (128/128 bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 0375E1C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:28:55 +0200 (CEST)
+Received: by mail-wm0-f52.google.com with SMTP id w16-v6so5830963wmc.2 for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 07:28:54 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
+ s=20161025; h=message-id:subject:from:to:date:mime-version;
+ bh=QnXo8D8HUHqXfE62JclKroDUhTwZH2aLsxvjpGM7keE=;
+ b=FSs6PGnWsRzJotk5uKO5+YufzsIDXJy55mfw5kZpMJUwuu/KdNOvLQ/xAxPXfOUj40
+ g/arRaUKn/F6pbKZXIO1KoUlbtxk+o6FqeIFszNry8mHxoUtu32S38YwlB99J+WIbx5z
+ EtWBtKdgt3+BbF7l3hQrVLTHn4BwzjgJKGDYVU/LjfZvjy+smdNARdDEVkGL6utRZiUt
+ LHuOKedP0WlXIxPMzQbVEQU4M4Vi/ahJIR9Lbu+NCrEPjnQ210WNhg1EyEzQXA4V48KL
+ Y+CFdrQ46+ZjeNObJjf1/UG46Q2qYrWHi80o9lTytLliN17Z7wxz5L2+pLqiWE78FJp3 TsXw==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-gm-message-state:message-id:subject:from:to:date:mime-version;
+ bh=QnXo8D8HUHqXfE62JclKroDUhTwZH2aLsxvjpGM7keE=;
+ b=QF5yI5HJYl+eRV9gF1am7g1V4t0qUIPSAjeHjDDHkmBsIjkJXljqgEsisa7ttrgTBj
+ LmZQHjxFBSXPTPEpXuuhg3/V+wUO0KH0yRjc2ei2mNHtCrA05lMUn47R0vTQ1BuX+gAZ
+ KMGccx8nhOvLXA0w7YMR/zNJgmcZdgXHxYWk6glWZmtBq1qv4ATglaUSGpfqm5fFZIsu
+ Zt3sjq0vQPSAJjh3BlY7m/y7cXyEqTpPcfWBLsypKtR7dgxKqJ0GftcxyXwrfBAc7+xg
+ 6nvDN0uDQjiqVha9Xg5JAABddjRpzmkKufuiIt/nPHib5aUKvjaIJC9zdmY6KpSX2QP6 UW7A==
+X-Gm-Message-State:
+ AOUpUlEc8BqkXZ4lWed35fCbnlFhOJ9DicVwfQY6GfaD5pJW7Pelq+Zs
+ fBzvcVasuSYAzLklwF4g33VT/+JJ
+X-Google-Smtp-Source:
+ AAOMgpfxc5TMsZqzJLXTHV8rzmpu54NF/yrglDtVFafTiXK2zfycZ1iuZn4tQRgKTW9miE4x2kYfFg==
+X-Received: by 2002:a1c:91c7:: with SMTP id
+ t190-v6mr1617954wmd.2.1531405734503; Thu, 12 Jul 2018 07:28:54 -0700 (PDT)
+Received: from x200arch (w3mcopupx55fiv-v6.eduroam.dynamic.rbg.tum.de.
+ [2001:4ca0:2003:1920:ee1a:a3c0:db1f:36d8]) by smtp.googlemail.com with
+ ESMTPSA id y191-v6sm8407779wme.21.2018.07.12.07.28.53 for
+ <lammich@in.tum.de> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305
+ bits=256/256); Thu, 12 Jul 2018 07:28:53 -0700 (PDT)
+Message-ID: <1d291cfdaaa8ecf35fbf67870d9d472d29b35b74.camel@gmail.com>
+Subject: [FDS] Homework 13
+From: Joshua von Mutius <j.v.mutius@gmail.com>
+To: Peter Lammich <lammich@in.tum.de>
+Date: Thu, 12 Jul 2018 16:24:42 +0200
+Content-Type: multipart/mixed; boundary="=-SaVG4Be8qiGMgAgikp7T"
+X-Mailer: Evolution 3.28.3 
+Mime-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--=-SaVG4Be8qiGMgAgikp7T
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+Dear Mr. Lammich,
+attached is my submission for Homework 13
+
+Regards,
+Joshua von Mutius
+--=-SaVG4Be8qiGMgAgikp7T
+Content-Disposition: attachment; filename="hw13tmpl.thy"
+Content-Type: text/plain; name="hw13tmpl.thy"; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+"init \<equiv> []"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> \<equiv> length"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0" unfolding \<Phi>_def by simp
+lemma \<Phi>_init: "\<Phi> init = 0" unfolding \<Phi>_def init_def by simp
+
+lemma a_push: "t_push x xs + \<Phi> (push x xs) - \<Phi> xs = 2"
+  unfolding \<Phi>_def t_push_def
+  by simp
+
+lemma a_pop: "t_pop n xs + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  unfolding \<Phi>_def t_pop_def
+  by simp
+(*<*)
+end
+(*>*)
+
+
+
+--=-SaVG4Be8qiGMgAgikp7T--
+
+
+From daniel.kutasi@outlook.de Thu Jul 12 18:22:51 2018
+Return-Path: <daniel.kutasi@outlook.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ ViSKLVuAR1tsFQAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 18:22:51 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id B923B1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 18:22:51 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 2C18D1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 18:22:50
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ B4F161C03B2; Thu, 12 Jul 2018 18:22:51 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id B24581C04EA; Thu, 12 Jul 2018 18:22:51 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 871481C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 18:22:51 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 7CAEB1C03B2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 18:22:51 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 7B24E1C03C9; Thu, 12 Jul 2018 18:22:51 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.1 required=7.0
+ tests=AWL,BAYES_20,FREEMAIL_FROM,
+ HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 621FB1C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 18:22:49 +0200 (CEST)
+Received: from EUR02-AM5-obe.outbound.protection.outlook.com
+ (mail-oln040092067103.outbound.protection.outlook.com [40.92.67.103])
+ (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No
+ client certificate requested) by vmmaildmz2.informatik.tu-muenchen.de
+ (Postfix) with ESMTPS id 4A4241C03C2 for <lammich@in.tum.de>; Thu, 12 Jul
+ 2018 18:22:49 +0200 (CEST)
+Received: from AM5EUR02FT053.eop-EUR02.prod.protection.outlook.com
+ (10.152.8.55) by AM5EUR02HT198.eop-EUR02.prod.protection.outlook.com
+ (10.152.9.83) with Microsoft SMTP Server (version=TLS1_2,
+ cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.930.16; Thu, 12
+ Jul 2018 16:22:47 +0000
+Received: from AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM (10.152.8.53) by
+ AM5EUR02FT053.mail.protection.outlook.com (10.152.9.196) with Microsoft
+ SMTP Server (version=TLS1_2,
+ cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.930.16 via
+ Frontend Transport; Thu, 12 Jul 2018 16:22:47 +0000
+Received: from AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM
+ ([fe80::6c67:fb0c:a8b5:33fb]) by AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM
+ ([fe80::6c67:fb0c:a8b5:33fb%4]) with mapi id 15.20.0952.017; Thu, 12 Jul
+ 2018 16:22:47 +0000
+From: Daniel Kutasi <daniel.kutasi@outlook.de>
+To: Peter Lammich <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGfyST4UC6uH0RkWLp/ts61sH2g==
+Date: Thu, 12 Jul 2018 16:22:47 +0000
+Message-ID: <AM5PR1001MB09953AE5DC81B7208303B9B188590@AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM>
+Accept-Language: de-DE, en-US
+Content-Language: en-US
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-clientproxiedby: LO2P265CA0117.GBRP265.PROD.OUTLOOK.COM
+ (2603:10a6:600:c::33) To AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM
+ (2603:10a6:203:11::18)
+x-incomingtopheadermarker:
+ OriginalChecksum:39EB571719C623C199A24E321336CF399820C3AE44521A5AC5F7B8393BC77E49;UpperCasedChecksum:068CDEB7D8112D64066A9812D933165FBDC3466114FE4C5CC56C291C172965A0;SizeAsReceived:7244;Count:47
+x-ms-exchange-messagesentrepresentingtype: 1
+x-tmn: [wc++lFSSMJc3ZeZXEZ1iN63jmVgJSNQV]
+x-ms-publictraffictype: Email
+x-microsoft-exchange-diagnostics:
+ 1;AM5EUR02HT198;7:PvXy1U2X0s9JhyxegoCDRu/7SMwKm/6E3g+78Lk31FV03Mz0HhMAFP+b8AOcFwN6oBGx4xBaNW1nZ3yyA27q9zE72TYVthxS/ayAdLGSOxEBjIPXnKgtYoXQn/BncrlZ0Ll38BtW72y+GSA2EkfkxCczV0K3A56M/r3Fd7hBwg/0WzrELiRtJIlM0cH5HEjJcAIq29cIaOhlRCk6KUGxC4+p5n4R9ZJ41Y5eRWLqXeV62NPeRhAr6vFyKQwQfa5U
+x-incomingheadercount: 47
+x-eopattributedmessage: 0
+x-microsoft-antispam:
+ UriScan:;BCL:0;PCL:0;RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101448)(1701031045);SRVR:AM5EUR02HT198;
+x-ms-traffictypediagnostic: AM5EUR02HT198:
+x-exchange-antispam-report-cfa-test:
+ BCL:0;PCL:0;RULEID:(102415395)(82015058);SRVR:AM5EUR02HT198;BCL:0;PCL:0;RULEID:;SRVR:AM5EUR02HT198;
+x-forefront-prvs: 0731AA2DE6
+x-forefront-antispam-report:
+ SFV:NSPM;SFS:(7070007)(199004)(189003)(6506007)(102836004)(5250100002)(26005)(6346003)(386003)(44832011)(305945005)(476003)(588024002)(97736004)(558084003)(25786009)(9686003)(54896002)(99286004)(6436002)(104016004)(7696005)(86362001)(55016002)(486006)(256004)(74316002)(106356001)(5660300001)(8936002)(8676002)(99936001)(81156014)(105586002)(6916009)(68736007)(33656002)(74482002)(75402003)(82202002)(2900100001)(14454004)(555874004);DIR:OUT;SFP:1901;SCL:1;SRVR:AM5EUR02HT198;H:AM5PR1001MB0995.EURPRD10.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:;
+received-spf: None (protection.outlook.com: outlook.de does not designate
+ permitted sender hosts)
+authentication-results: spf=none (sender IP is )
+ smtp.mailfrom=daniel.kutasi@outlook.de; 
+x-microsoft-antispam-message-info:
+ 6IzUvTb2LxzYpszW120SxmwXSbcjHm5VwOeA2EYdk9Z5gqE0JByT0HIXg20hb10ykBnMRwezmSZ+zZtHJjCTDcLDS5JOosRiS7IbGEd8UNbg08qSgVsCTOp05yKAiAv9pZkURUDOjnGJCzFPISe17/UPV9bFDXsU27mxklCjp/Wfq6FRQEYbl/xRaDy4oz81xjYUDLwmziiOC60uPPEjKlmEyT1ZCAH8bYGh30J8s/Y=
+Content-Type: multipart/mixed; boundary="_004_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_"
+MIME-Version: 1.0
+X-OriginatorOrg: outlook.com
+X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg:
+ 9bd8b953-1c55-4da7-b616-8bcad099ae8b
+X-MS-Exchange-CrossTenant-Network-Message-Id:
+ 108a2e06-978d-49c0-cb5d-08d5e813b3c1
+X-MS-Exchange-CrossTenant-rms-persistedconsumerorg:
+ 9bd8b953-1c55-4da7-b616-8bcad099ae8b
+X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2018 16:22:47.6931
+ (UTC)
+X-MS-Exchange-CrossTenant-fromentityheader: Internet
+X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
+X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT198
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_
+Content-Type: multipart/alternative; boundary="_000_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_"
+
+
+--_000_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+ga68zak
+03623674
+
+--_000_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_
+Content-Type: text/html; charset="utf-8"
+Content-ID: <595D046A8E262B43A6A26366BEA4F56F@EURPRD10.PROD.OUTLOOK.COM>
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+<div dir="ltr">ga68zak
+<div>03623674</div>
+</div>
+</body>
+</html>
+
+--_000_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_--
+
+--_004_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_
+Content-Type: application/octet-stream; name="hw13.thy"
+Content-Description: hw13.thy
+Content-Disposition: attachment; filename="hw13.thy"; size=1708; creation-date="Thu, 12 Jul 2018 16:22:46 GMT"; modification-date="Thu, 12 Jul 2018 16:22:46 GMT"
+Content-ID: <f_jjirhhvy0>
+Content-Transfer-Encoding: base64
+
+KCo8KikKdGhlb3J5IGh3MTMKaW1wb3J0cyBDb21wbGV4X01haW4KYmVnaW4KKCo+KikKCnRleHQg
+XDxvcGVuPlxIb21ld29ya3tBbW9ydGl6ZWQgQ29tcGxleGl0eX17MTMuMDcuMjAxOH0KCiAgVGhp
+cyBpcyBhbiBvbGQgZXhhbSBxdWVzdGlvbiwgd2hpY2ggd2UgaGF2ZSBjb252ZXJ0ZWQgdG8gYSBo
+b21ld29yayB0bwogIGJlIGRvbmUgd2l0aCBJc2FiZWxsZSEKXDxjbG9zZT4KCnRleHQgXDxvcGVu
+PkEgYGBzdGFjayB3aXRoIG11bHRpcG9wJycgaXMgYSBsaXN0IHdpdGggdGhlIGZvbGxvd2luZyB0
+d28gaW50ZXJmYWNlIGZ1bmN0aW9uczpcPGNsb3NlPgoKZnVuIHB1c2ggOjogIidhIFw8UmlnaHRh
+cnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+ICdhIGxpc3QiIHdoZXJlCiJwdXNoIHggeHMgPSB4
+ICMgeHMiCgpmdW4gcG9wIDo6ICJuYXQgXDxSaWdodGFycm93PiAnYSBsaXN0IFw8UmlnaHRhcnJv
+dz4gJ2EgbGlzdCIgd2hlcmUKInBvcCBuIHhzID0gZHJvcCBuIHhzIgoKdGV4dCBcPG9wZW4+WW91
+IG1heSBhc3N1bWVcPGNsb3NlPgoKZGVmaW5pdGlvbiB0X3B1c2ggOjogIidhIFw8UmlnaHRhcnJv
+dz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+IG5hd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YWRkOiBcPFBoaT5fZGVmIGluaXRfZGVmKQoKbGVtbWEgYV9wdXNoOiAidF9wdXNoIHggeHMgKyBc
+PFBoaT4ocHVzaCB4IHhzKSAtIFw8UGhpPiB4cyA9IDIiCiAgYXBwbHkgKGluZHVjdGlvbiB4cyBy
+dWxlOiBwdXNoLmluZHVjdCkKICBieSAoc2ltcF9hbGwgYWRkOiBcPFBoaT5fZGVmIHRfcHVzaF9k
+ZWYpCgpsZW1tYSBhX3BvcDogInRfcG9wIG4geHMgKyBcPFBoaT4ocG9wIG4geHMpIC0gXDxQaGk+
+IHhzID0gMCIgCiAgYXBwbHkgKGluZHVjdGlvbiB4cyBydWxlOiBwdXNoLmluZHVjdCkKICBieSAo
+c2ltcF9hbGwgYWRkOiBcPFBoaT5fZGVmIHRfcG9wX2RlZikKCigqPCopCmVuZAooKj4qKQoKCg==
+
+--_004_AM5PR1001MB09953AE5DC81B7208303B9B188590AM5PR1001MB0995_--
+
+From florian.stamer@tum.de Thu Jul 12 20:53:03 2018
+Return-Path: <florian.stamer@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ ewl3N3WjR1vCdwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 20:53:03 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id D56B61C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 20:53:03 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 39A721E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 20:53:02
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ D0A7B1C03B6; Thu, 12 Jul 2018 20:53:03 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id CE4EB1C04EA; Thu, 12 Jul 2018 20:53:03 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id A93151C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:03 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 9F0E71C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:03 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 9D9C71C03C9; Thu, 12 Jul 2018 20:53:03 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id BBEB61C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:01 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id AFD691C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:01 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41RQ714hwVzyXJ for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:01 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531421581;
+ bh=YbbnZAk2E17IKQO28nQykAxchZndZgu1k3+OvasbqQ4=; b=IyZ5tPTz/baC
+ neG2CU5UDf/XmL40OChXA0fWiKbQzGEenD22vSVl1w7V08+mJZ3+Kr1zwUqEOyY5
+ kDGzjVUfPIoMHZb1TxUjGqw4DLiJBgZex5v36rjNJFNJqd6wGiijN2r3MC6fK4Yt
+ rdSmR/WmwuQc3rUTdvipST9oxrNZpRnyVMOrd8iKTiEldTCMyjSdj0TCQPK+5zKw
+ tRpUJzOA2NxqHfC8u28FmwGq7BKprXaAjS2kq2Q//3l+fVcvZBv/WfNyYeWYcbLt
+ b9MnCYstlEFeqF0KpbT+jtInfGQw0dIjbyDRdTlxWtkhRxV4CVI8WYTisR1+gynk
+ TwzRsX51KA==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ nVaNgsEG5QxF for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:01 +0200 (CEST)
+Received: from BADWLRZ-SWMBX10.ads.mwn.de (BADWLRZ-SWMBX10.ads.mwn.de
+ [10.156.54.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384
+ (256/256 bits)) (Client CN "BADWLRZ-SWMBX10", Issuer "BADWLRZ-SWMBX10" (not
+ verified)) by postout2.mail.lrz.de (Postfix) with ESMTPS id 41RQ712tXjzyXF
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 20:53:01 +0200 (CEST)
+Received: from BADWLRZ-SWMBX09.ads.mwn.de (2001:4ca0:0:108::165) by
+ BADWLRZ-SWMBX10.ads.mwn.de (2001:4ca0:0:108::166) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Thu, 12 Jul 2018 20:53:00 +0200
+Received: from BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c]) by
+ BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c%12]) with mapi id
+ 15.01.1531.003; Thu, 12 Jul 2018 20:52:59 +0200
+From: "Stamer, Florian" <florian.stamer@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGhFlBxMAqlTL9EetpODYgV54Zw==
+Date: Thu, 12 Jul 2018 18:52:59 +0000
+Message-ID: <0b069a20e7c74bf39e944a0cf62753ba@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX09.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [92.219.216.158]
+Content-Type: multipart/mixed; boundary="_004_0b069a20e7c74bf39e944a0cf62753batumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_0b069a20e7c74bf39e944a0cf62753batumde_
+Content-Type: multipart/alternative; boundary="_000_0b069a20e7c74bf39e944a0cf62753batumde_"
+
+
+--_000_0b069a20e7c74bf39e944a0cf62753batumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Mr. Lammich,
+
+
+the .thy file for exercise 13 is in the attachments.
+
+
+Best regards
+
+Florian Stamer [03664701]
+
+--_000_0b069a20e7c74bf39e944a0cf62753batumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
+<p>Dear Mr. Lammich,</p>
+<p><br>
+</p>
+<p>the .thy file for exercise 13 is in the attachments.</p>
+<p><br>
+</p>
+<p>Best regards</p>
+<p>Florian Stamer [03664701]</p>
+</div>
+</body>
+</html>
+
+--_000_0b069a20e7c74bf39e944a0cf62753batumde_--
+
+--_004_0b069a20e7c74bf39e944a0cf62753batumde_
+Content-Type: application/octet-stream; name="ex13.thy"
+Content-Description: ex13.thy
+Content-Disposition: attachment; filename="ex13.thy"; size=1495; creation-date="Thu, 12 Jul 2018 18:52:56 GMT"; modification-date="Thu, 12 Jul 2018 18:52:56 GMT"
+Content-Transfer-Encoding: base64
+
+KCo8KikKdGhlb3J5IGV4MTMKaW1wb3J0cyBNYWluCmJlZ2luCigqPiopCgp0ZXh0IFw8b3Blbj5c
+SG9tZXdvcmt7QW1vcnRpemVkIENvbXBsZXhpdHl9ezEz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
+LgoKUHJvdmlkZSBjb21wbGV0ZSBwcm9vZnMgaW4gSXNhYmVsbGUhCgpPcmlnaW5hbCB0ZXh0IGhl
+cmUgd2FzOgpcZW1waHsKSWYgeW91IG5lZWQgYW55IHByb3BlcnRpZXMgb2YgdGhlIGF1eGlsaWFy
+eSBmdW5jdGlvbnMgXDxvcGVuPmxlbmd0aFw8Y2xvc2U+LCBcPG9wZW4+ZHJvcFw8Y2xvc2U+IGFu
+ZCBcPG9wZW4+bWluXDxjbG9zZT4sCnlvdSBzaG91bGQgc3RhdGUgdGhlbSBidXQgeW91IGRvIG5v
+dCBuZWVkIHRvIHByb3ZlIHRoZW0ufVw8Y2xvc2U+CgpkZWZpbml0aW9uIFw8UGhpPiA6OiAiJ2Eg
+bGlzdCBcPFJpZ2h0YXJyb3c+IG5hdCIKICB3aGVyZSAiXDxQaGk+IHhzID0gbGVuZ3RoIHhzIgoK
+CmxlbW1hIGFybW9ydF9wdXNoOiAidF9wdXNoIHggeHMgKyBcPFBoaT4gKHB1c2ggeCB4cykgLSBc
+PFBoaT4geHMgXDxsZT4gMiIKICBieSAoaW5kdWN0aW9uIHhzIGFyYml0cmFyeTogeCkgKGF1dG8g
+c2ltcDogdF9wdXNoX2RlZiBcPFBoaT5fZGVmKQoKbGVtbWEgYXJtb3J0X3BvcDogInRfcG9wIGsg
+eHMgKyBcPFBoaT4gKHBvcCBrIHhzKSAtIFw8UGhpPiB4cyBcPGxlPiAwIgogIGJ5IChpbmR1Y3Rp
+b24geHMgYXJiaXRyYXJ5OiBrKSAoYXV0byBzaW1wOiB0X3BvcF9kZWYgXDxQaGk+X2RlZikKCigq
+PCopCmVuZAooKj4qKQ==
+
+--_004_0b069a20e7c74bf39e944a0cf62753batumde_--
+
+From felix.wielander@tum.de Thu Jul 12 21:31:36 2018
+Return-Path: <felix.wielander@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ cmRiBFCsR1stUAAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 21:31:36 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 565A61C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 21:31:36 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id AB21F1E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 21:31:34
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 51A861C03B6; Thu, 12 Jul 2018 21:31:36 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 4E7B81C04ED; Thu, 12 Jul 2018 21:31:36 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 294061C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:36 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 1EC901C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:36 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 1D63D1C2DD0; Thu, 12 Jul 2018 21:31:36 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED autolearn=no autolearn_force=no
+ version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id 5243F1C2DD2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:34 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id 473B61C2DBD
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:34 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41RQzV1h5XzyX3 for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:34 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ content-language:content-type:content-type:mime-version
+ :user-agent:date:date:message-id:subject:subject:from:from
+ :received:received; s=postout; t=1531423893; bh=yxJ1cfCI7ANs6nmD
+ +TZjNYc4tvczjRxwcWOtlMUM0Jo=; b=SvcboopzRA1zMPy+TKtpy8q9QXN8qdRF
+ Yeb99fvy/3WPelk2cT4qYnGFLPbTV/E6/pgBdMBZbrTwLURAOuCOarHdScDX/ZLv
+ WFbSF0F45mmHa7eYn5E+dIoK0/NR80a5Dt1EGvk7gqyVIgbB/3z/OhvheZwbTsi1
+ MBt7UXwBYviRl+qqQL3E9t0tk2oiWgbgGyQFGKLsa5YdQnj2xnbRz6/RfbO0j/xe
+ GJ0h9giARobRmTTcDIqfFRApE4b4TK+fkPeSUfcDD9OQpLMoEynzXMJtVn7kSRDe
+ +p2h2Ctkv+055qM9fCB1DzzLWaUl6/u0fgPjS9bn4RvmzJZk+NgVDQ==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ wN-ZYfsRZysX for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:33 +0200 (CEST)
+Received: from [IPv6:2001:a61:4804:6801:533a:fd66:ba23:3ed2] (unknown
+ [IPv6:2001:a61:4804:6801:533a:fd66:ba23:3ed2]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate
+ requested) by postout2.mail.lrz.de (Postfix) with ESMTPSA id 41RQzT5WRmzyVW
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 21:31:33 +0200 (CEST)
+To: Peter Lammich <lammich@in.tum.de>
+From: Felix Wielander <felix.wielander@tum.de>
+Subject: [FDS] Homework 13
+Message-ID: <8d04371b-db51-57f1-f5c6-0ec72bba6e5c@tum.de>
+Date: Thu, 12 Jul 2018 21:31:33 +0200
+User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
+ Thunderbird/52.8.0
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------393F3CFF3CBA09765E7EB20A"
+Content-Language: en-US
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+This is a multi-part message in MIME format.
+--------------393F3CFF3CBA09765E7EB20A
+Content-Type: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+
+
+--------------393F3CFF3CBA09765E7EB20A
+Content-Type: text/plain; charset=UTF-8; name="hw13tmpl.thy"
+Content-Disposition: attachment; filename="hw13tmpl.thy"
+Content-Transfer-Encoding: 8bit
+
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+  "init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> xs = length xs"
+
+lemma gte_zero: "\<Phi> xs \<ge> 0"
+  apply (induction xs)
+  by auto
+
+lemma init_zero: "\<Phi> init = 0"
+  unfolding init_def by (simp add: \<Phi>_def)
+
+(* f\<^sub>1 = push, f\<^sub>2 = pop *)
+(* s\<^sub>0 := init, s\<^sub>1 = f\<^sub>1 s\<^sub>0, s\<^sub>2 = f\<^sub>2 s\<^sub>1 *)
+
+(* a\<^sub>2 = t_pop s\<^sub>1 + \<Phi> s\<^sub>2 - \<Phi> s\<^sub>1 *)
+(* a\<^sub>1 = t_push s\<^sub>0 + \<Phi> s\<^sub>1 - \<Phi> s\<^sub>0 *)
+
+(* a\<^sub>1 + a\<^sub>2 = 1 + (-1) = 0 *)
+
+lemma "(t_push x init + \<Phi> (push x init) - \<Phi> init) + (t_pop n (push x init) + \<Phi> (pop n (push x init)) - \<Phi> (push x init)) = 2"
+  apply auto
+  sorry
+
+(*<*)
+end
+(*>*)
+
+
+
+--------------393F3CFF3CBA09765E7EB20A--
+
+From clemens.jonischkeit@yahoo.de Thu Jul 12 22:54:57 2018
+Return-Path: <SRS0=39CP=J4=yahoo.de=clemens.jonischkeit@srs.mail.lrz.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ osG1Ovq/R1siCgAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 22:54:57 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 00C5B1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 22:54:57 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 4E55D1E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 22:54:55
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ F0DA41C03B1; Thu, 12 Jul 2018 22:54:56 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id EE20E1C04EA; Thu, 12 Jul 2018 22:54:56 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id CA6611C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 22:54:56 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id BF5D61C03B1
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 22:54:56 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id BDBBE1C2DD3; Thu, 12 Jul 2018 22:54:56 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id E4C0A1C2DD2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 22:54:54 +0200 (CEST)
+Received: from forwout1.mail.lrz.de (forwout1.mail.lrz.de
+ [129.187.255.130]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id D9AFC1C2DD0
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 22:54:54 +0200 (CEST)
+Received: from postforw1.mail.lrz.de (lxmhs61.srv.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:63d]) by forwout1.mail.lrz.de (Postfix) with
+ ESMTP id 41RSqf5vw6zFN for <lammich@in.tum.de>; Thu, 12 Jul 2018 22:54:54
+ +0200 (CEST)
+Received: from postrelay2.lrz.de (lxmhs60.srv.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:63c]) by postforw1.mail.lrz.de (Postfix) with
+ ESMTP id 41RSqf5nq8zyWS for <peter.lammich@tum.de>; Thu, 12 Jul 2018
+ 22:54:54 +0200 (CEST)
+Received: from lxmhs60.srv.lrz.de (localhost [127.0.0.1]) by
+ postrelay2.lrz.de (Postfix) with ESMTP id 41RSqf5Y9NzyRn for
+ <peter.lammich@tum.de>; Thu, 12 Jul 2018 22:54:54 +0200 (CEST)
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs60.srv.lrz.de
+Authentication-Results: postrelay.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) header.d=yahoo.de
+Received: from postrelay2.lrz.de ([127.0.0.1]) by lxmhs60.srv.lrz.de
+ (lxmhs60.srv.lrz.de [127.0.0.1]) (amavisd-new, port 10001) with ESMTP id
+ VNxaJStnC04f for <peter.lammich@tum.de>; Thu, 12 Jul 2018 22:54:54 +0200
+ (CEST)
+Received: from sonic305-21.consmr.mail.ir2.yahoo.com
+ (sonic305-21.consmr.mail.ir2.yahoo.com [77.238.177.83]) (using TLSv1.2 with
+ cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present
+ a certificate) by postrelay2.lrz.de (Postfix) with ESMTPS for
+ <peter.lammich@tum.de>; Thu, 12 Jul 2018 22:54:54 +0200 (CEST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048;
+ t=1531428893; bh=q/JtEheN51M+G10gm3C4I8fSGMEmwvrU0nxL7D951ME=;
+ h=To:From:Subject:Date:From:Subject;
+ b=ZppjFJMI9ACUJ8rk3PtBlAkvmn5JqiNlTGQwVO02l7vIy3VV+hzDxSPDJfMKvrbzDfsZp12DiA/nAhrhCSyeunz+P6OjfjnL92GU15SUhh9Ium8LBGEt3tCFx8vUXZzPaHLHVsQekh5x+QwHEH2/BbdlVXaPDlXdjat0YRSvftYJEdUz8PNRxBKTnuelHPdgD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gZ9IaWvAoHjxcAePUgcTy31VPrBeZJyJt5
+ OL.j0tpbHE9Q68qDpBJgPlXBQ29NGojEf.ECfcKWFuJXMc0eB5QShOIn2BuFiuZCGjaGfYv9uQ_P
+ 6UcbPQKYFk0mNrLU3Y_LyEKbb7a8lGaDL8lD2s4rvvw--
+Received: from sonic.gate.mail.ne1.yahoo.com by
+ sonic305.consmr.mail.ir2.yahoo.com with HTTP; Thu, 12 Jul 2018 20:54:53
+ +0000
+Received: from x59cc8299.dyn.telefonica.de (EHLO [192.168.137.64])
+ ([89.204.130.153]) by smtp401.mail.ir2.yahoo.com (Oath Hermes SMTP Server)
+ with ESMTPA ID ad9581971c08c9a3b5f1ac269e0e5058 for <peter.lammich@tum.de>;
+ Thu, 12 Jul 2018 20:54:49 +0000 (UTC)
+To: Peter Lammich <peter.lammich@tum.de>
+From: Clemens Jonischkeit <clemens.jonischkeit@yahoo.de>
+Subject: [FDS] Homework 13
+Openpgp: preference=signencrypt
+Autocrypt: addr=clemens.jonischkeit@yahoo.de; prefer-encrypt=mutual;
+ keydata=
+ xsFNBFWUYZYBEAC+I2QQ+NKlYvY1nXCZ6DKcqQ8Krjl26Ac0x14VIuNCN5d0Splf6u/Z4rp6
+ GjXMrMy0swSHHORdydGeyFXNO+YQLYPFSZz/kVDmBnFEGh9OoxF1GpdR8mbyDaAJR+4Uig/3
+ eZoiOX5jQ/pK4e4VWdaVyp4muM+FdbSzhY4m+GcPO2srunRj4ewhrgDsM/uRp5yrlz1XmnyP
+ NnJ+2OKuDMHLJMM2Jh4IAtbJBKK5kpPJQGKLjkLpnw0bG/ddUm7vO2djFLtRgjv048w4atLT
+ jp9QwoDb49ciwh81KQqtdqzSirVcW20z3oNWnvY5wovX17oGOn/hyvL8fFvksYF3dvy5jmo7
+ b/W3tE3yITN8HlwVnl7xggliWa5LjFn5Re3brs9gGJ19R/o8RjS5BViXeLrbAD6pACRu5ReX
+ aMPmdmFNJh1zLIMboEiCgBESsk34F1mhBULzFyH/T4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aQ3X8Q3Rn9VVfQDlTEE05jh13NmMJfk7mIuvYzL0Wg1S/Or85YC3lcAErUJzgUE1yL+QtDiW
+ aXkgU6B8iPmE0umchlxvwGoxH2Cc+LjWwW4k/d9HU43KkrqHav8XhphatP4xpyZO2NeArun9
+ MDArePduuypaP0YWApc8q7or2qKKPnkDkEfV7wMvKx6Ih/nBOdYNgmIHEjt0v+Of+19netKz
+ IEFUl2mf4q1ii4Wbrd4W9pl069b1WNSeR6I9d+LFvuPXOuef6L0u69VBCu5PrZ1E5fLOrSUN
+ ANhhjaT7F9WgS8u039hZ10SNMCKltHyIq9rpnxrYCl8QbsPq2kzmXmsP5c7UfkoZoDMNcifT
+ lpw2aCEY+TFdjdB9IJEOS4PCRZt4KyMGCaPj6+wXyXy1MwcYEdV086/Durxtc2aRMg+NwCbL
+ ECl5KN9QkAfW+icQoZ5nfo+HqriMor9P7RKvn4MSDtjiZLHJjSSrIGw9ObJx08zQlhoTzPOv
+ aGbS8R3fmY8M+4lRH9ELQiO8vQ==
+Message-ID: <00650c16-957a-5188-fd98-bf7baa74c675@yahoo.de>
+Date: Thu, 12 Jul 2018 22:54:45 +0200
+User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
+ Thunderbird/52.8.0
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------AAD10162F938BBF3F6E1F9F5"
+Content-Language: en-US
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+This is a multi-part message in MIME format.
+--------------AAD10162F938BBF3F6E1F9F5
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Hi,
+
+please find my submission of Homework 13 attached to this email
+
+best,
+Clemens
+
+--------------AAD10162F938BBF3F6E1F9F5
+Content-Type: text/plain; charset=UTF-8; name="jonischkeit13.thy"
+Content-Disposition: attachment; filename="jonischkeit13.thy"
+Content-Transfer-Encoding: 8bit
+
+(*<*)
+theory jonischkeit13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition init :: "'a list" where
+"init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> as = int (length as)"
+
+lemma phi_init:
+  "\<Phi> init = 0" unfolding init_def \<Phi>_def by simp
+
+lemma phi_ge0:
+  "\<Phi> xs \<ge> 0" unfolding \<Phi>_def by simp
+
+lemma a_push:
+  "int (t_push x xs) + \<Phi> (push x xs) - \<Phi> xs = 2"
+  unfolding t_push_def \<Phi>_def by auto
+
+lemma a_pop:
+  "int (t_pop n xs) + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  unfolding t_pop_def \<Phi>_def by simp
+
+datatype 'a opr = PUSH 'a | POP nat
+
+fun execute :: "'a list \<Rightarrow> ('a opr) list \<Rightarrow> 'a list" where
+"execute as [] = as" |
+"execute as ((PUSH a) # xs) = execute (push a as) xs" |
+"execute as ((POP n) # xs) = execute (pop n as) xs"
+
+fun t_execute :: "'a list \<Rightarrow> ('a opr) list \<Rightarrow> nat" where
+"t_execute _ [] = 0" |
+"t_execute as ((PUSH a) # xs) = t_execute (push a as) xs + t_push a as" |
+"t_execute as ((POP n) # xs) = t_execute (pop n as) xs + t_pop n as"
+
+lemma add_nat:
+  "a + b = b + (a :: nat)"
+  by auto
+
+lemma t_execute_aux:
+  "int (t_execute as ops) \<le> 2 * int (length ops) + \<Phi> (as) - \<Phi> (execute as ops)"
+proof (induction as ops rule: execute.induct)
+  case (1 as)
+then show ?case by simp
+next
+  case (2 as a xs)
+  then show ?case using a_push[of a as] by auto
+next
+  case (3 as n xs)
+  then show ?case using a_pop[of n as] by auto
+qed 
+
+lemma "t_execute init ops \<le> 2 * length ops"
+  using t_execute_aux[of init ops] phi_init
+  by (smt mult_2 of_nat_add of_nat_le_iff phi_ge0)
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+(*<*)
+end
+(*>*)
+
+--------------AAD10162F938BBF3F6E1F9F5--
+
+From eric.koepke@online.de Fri Jul 13 01:35:09 2018
+Return-Path: <SRS0=bzJD=J4=online.de=eric.koepke@srs.mail.lrz.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ I/rTLWvlR1vgBAAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 01:35:09 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 8602E1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 01:35:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id C42001E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 01:35:07
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 81F741C03B6; Fri, 13 Jul 2018 01:35:09 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 7F31F1C0502; Fri, 13 Jul 2018 01:35:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 5B1741C04EA for <lammich@in.tum.de>; Fri, 13 Jul 2018 01:35:09 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 4F8B61C03B6
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 01:35:09 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 4E04D1C2DD2; Fri, 13 Jul 2018 01:35:09 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-3.2 required=7.0 tests=AWL,BAYES_00,
+ RCVD_IN_DNSWL_MED autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id 861511C2DD0
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 01:35:07 +0200 (CEST)
+Received: from forwout2.mail.lrz.de (forwout2.mail.lrz.de
+ [129.187.255.131]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id 7B0F51C2DBD
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 01:35:07 +0200 (CEST)
+Received: from postforw1.mail.lrz.de (postforw.mail.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:63d]) by forwout2.mail.lrz.de (Postfix) with
+ ESMTP id 41RXNW39d5zFM for <lammich@in.tum.de>; Fri, 13 Jul 2018 01:35:07
+ +0200 (CEST)
+Received: from postrelay1b.lrz.de (lxmhs89.srv.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:659]) by postforw1.mail.lrz.de (Postfix) with
+ ESMTP id 41RXNW34v1zyWk for <peter.lammich@tum.de>; Fri, 13 Jul 2018
+ 01:35:07 +0200 (CEST)
+Received: from lxmhs89.srv.lrz.de (localhost [127.0.0.1]) by
+ postrelay1b.lrz.de (Postfix) with ESMTP id 41RXNW2xNgzyPT for
+ <peter.lammich@tum.de>; Fri, 13 Jul 2018 01:35:07 +0200 (CEST)
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs89.srv.lrz.de
+Received: from postrelay1b.lrz.de ([127.0.0.1]) by lxmhs89.srv.lrz.de
+ (lxmhs89.srv.lrz.de [127.0.0.1]) (amavisd-new, port 10001) with ESMTP id
+ kW4iuOctoVeL for <peter.lammich@tum.de>; Fri, 13 Jul 2018 01:35:07 +0200
+ (CEST)
+Received: from mout.kundenserver.de (mout.kundenserver.de
+ [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
+ (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec
+ ServerPass DE-2" (verified OK)) by postrelay1b.lrz.de (Postfix) with ESMTPS
+ for <peter.lammich@tum.de>; Fri, 13 Jul 2018 01:35:06 +0200 (CEST)
+Received: from [192.168.2.101] ([93.202.56.225]) by
+ mrelayeu.kundenserver.de (mreue002 [212.227.15.167]) with ESMTPSA (Nemesis)
+ id 0MIDV8-1feJbo24je-003yyI for <peter.lammich@tum.de>; Fri, 13 Jul 2018
+ 01:35:06 +0200
+Date: Fri, 13 Jul 2018 01:35:04 +0200
+Subject: [FDS] Homework 13
+X-Priority: 3
+Message-ID: <-o4tytt5oh5vr-pym5wb8g3ftx-op9edy-ubjupg-8o7o1f-ivaiz7-tzld3h-3fpi26hdih81qxb3sr-9otcdojv5iefnq5cjo-3lzyt6d3gy0w-u3jqdnhjvoa9-lzbfiu510x6n-1k7tt1rc91of-dzo3ek.1531438505538@email.android.com>
+From: "eric.koepke@online.de" <eric.koepke@online.de>
+To: "peter.lammich" <peter.lammich@tum.de>
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="--_com.android.email_235453504167180"
+X-Provags-ID: V03:K1:GkAXHwpt3a3K+YLFkrtKwaBRlOtKyOHqFoXiDuEy7VSZNzj1yMD
+ JYWAaiLz68V/NIqjcSJPW6oCZxBRJP9nTRtLNMkFY1xHWikg3uWwBvoqjY6VQzdcOVGTBV+
+ imPMoqkcKeZPQLXyJ22MOY02KHqxQ1EyfEn0Dgvm6W8D2LTpykFaJIM+y48XgTBdmtAvK0c
+ r5AmWBLlixszs2xDZqBOw==
+X-UI-Out-Filterresults:
+ notjunk:1;V01:K0:NldA6qa4U+I=:S1WFyhkWN4Eq1njPwuNgBd
+ /pKM+pk4YvmjVpEK+jbG0gvvGWomH8KQ6SqQnRIaWfPfWCv0YxW6M2fYiTtYjqD74WNhllCTU
+ WRHcw1+cPyGpHcsz3ZgYGNTERCqGHBZa/9o96KTD++iZMgP0T9IAnF/n0O6/BgkpOSQEE+6s6
+ hM4GVlyUD/LZfjxqrMIWybcUXYecovDUVbzD56PyxU9t5lDuLyNQo1RceKbt9cMqtsTgfhVbk
+ NtTWvJueNTqjSac1e1mXL9q8AV9je7Ernl/AWl50gIVVVi3SX85yN9yPz+dv0+otlQq6PaYTt
+ 589wTK1jqPcUcJPy9ifDhizJQoP3YIDS1eZYrjP+KuHHLqINXMlZLtVx5LUX2YMhs1WA1yxi9
+ k1i5hB+GPNUBOTn/pFWaa5PH7vypUBJmu91k53LDHmlMtxXn0iVC/CkGsorojm4lONN5bk2S1
+ HDX2rygVqRQIntvBkRdPzf4XT+gMPPxwJJ7KdSD2wMwnFTaf6xmHSL6xAzResbrsAHFafy2Co
+ gfmLEnO5zr1MinG9Gjtls/jwCLLOATALis3wFQC/myuLArSk1myG2fKkklNFCoFwe3Nu/gTHN
+ YWeeAuqrNWYMo5BqAWRybCZOwwUoB7v+qhDb3+aA3TgK13AQXKOqqjlzzNlnnaZcjYRyJkafc
+ EwJK5uCV848UAhw6YAX17u11LJRUqDc0wJqouW38xdKFVedmaxIn6pqls4xjDI0flJjs=
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+----_com.android.email_235453504167180
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Find the homework attached.
+Matr: 03665531
+
+Greetings,
+Eric Koepke
+
+----_com.android.email_235453504167180
+Content-Type: application/octet-stream; name="hw13.thy"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="hw13.thy"; size=1707
+
+KCo8KikKdGhlb3J5IGh3MTMKaW1wb3J0cyBNYWluCmJlZ2luCigqPiopCgp0ZXh0IFw8b3Blbj5c
+SG9tZXdvcmt7QW1vcnRpemVkIENvbXBsZXhpdHl9ezEzLjA3LjIwMTh9CgogIFRoaXMgaXMgYW4g
+b2xkIGV4YW0gcXVlc3Rpb24sIHdoaWNoIHdlIGhhdmUgY29udmVydGVkIHRvIGEgaG9tZXdvcmsg
+dG8KICBiZSBkb25lIHdpdGggSXNhYmVsbGUhClw8Y2xvc2U+Cgp0ZXh0IFw8b3Blbj5BIGBgc3Rh
+Y2sgd2l0aCBtdWx0aXBvcCcnIGlzIGEgbGlzdCB3aXRoIHRoZSBmb2xsb3dpbmcgdHdvIGludGVy
+ZmFjZSBmdW5jdGlvbnM6XDxjbG9zZT4KCmZ1biBwdXNoIDo6ICInYSBcPFJpZ2h0YXJyb3c+ICdh
+IGxpc3QgXDxSaWdodGFycm93PiAnYSBsaXN0IiB3aGVyZQoicHVzaCB4IHhzID0geCAjIHhzIgoK
+ZnVuIHBvc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LCB0aGVuIHdlIHNob3cgdGhhdCB0aGUgYXJtb3J0aXpl
+ZCBjb21wbGV4aXR5CiAgICAgd2hpY2ggaXMgdGhlIGFjdHVhbCBjb3N0IGluIGFkZGl0aW9uIHRv
+IHRoZSBjaGFuZ2UgaW4gcG90ZW50aWFsIGlzIGNvbnN0YW50IGZvciBhbGwKICAgICBvcGVyYXRp
+b25zLiBBZGRpdGlvbmFsbHkgdGhlIHBvdGVudGlhbCBvZiB0aGUgZW1wdHkgc3RhY2sgc2hvdWxk
+IGJlIDAuXDxjbG9zZT4KCmRlZmluaXRpb24gcG90IDo6ICInYSBsaXN0IFw8UmlnaHRhcnJvdz4g
+bmF0IiB3aGVyZQoicG90IHhzID0gbGVuZ3RoIHhzIgoKbGVtbWEgInBvdCBbXSA9IDAiCiAgYnkg
+KHNpbXAgYWRkOiBwb3RfZGVmKQoKbGVtbWEgInRfcHVzaCB4IHhzICsgcG90IChwdXNoIHggeHMp
+IC0gcG90IHhzID0gU3VjIChTdWMgMCkiCiAgYnkgKHNpbXAgYWRkOiBwb3RfZGVmIHRfcHVzaF9k
+ZWYpCgpsZW1tYSAidF9wb3AgbiB4cyArIHBvdCAocG9wIG4geHMpIC0gcG90IHhzID0gMCIKICAg
+IGJ5IChzaW1wIGFkZDogcG90X2RlZiB0X3BvcF9kZWYpCgoKKCo8KikKZW5kCigqPiopCgoK
+
+----_com.android.email_235453504167180--
+
+
+From katharinaluise.schmitt@tum.de Fri Jul 13 08:50:29 2018
+Return-Path: <katharinaluise.schmitt@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ +NprHnJLSFswPwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 08:50:29 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 6711C1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 08:50:29 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 7BC991E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 08:50:27
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 633E11C03AA; Fri, 13 Jul 2018 08:50:29 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 601D51C04E9; Fri, 13 Jul 2018 08:50:29 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 3AE8E1C03B1 for <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:29 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 2FAD71C03AA
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:29 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 2DD371C03C8; Fri, 13 Jul 2018 08:50:29 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 3EF921C03C9
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:26 +0200 (CEST)
+Received: from postout1.mail.lrz.de (postout1.mail.lrz.de
+ [129.187.255.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 3489A1C03C7
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:26 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41Rk2p15lxzyYH for
+ <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:26 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531464625;
+ bh=CfvnGiY303A6Qy3yGXvXW/a58usf2KOC6rUfQvYllRw=; b=y1TiASE/mFsE
+ U7THgzKm5aYCCveV8Zl//3r6fawv5+KwK7UvKdaOtqw/DF733c0nvsh4JQHJso5A
+ Ji8YE68s8q5htgUwoUnuHTpP1rtORv/gCXqz8ivBrdalijg0evsxQf8SdAR0cdHA
+ hdlCohu01nTqjfWaae24ZML7n7GqwQkjNKqk2nxgAyXQI546QkVOvSJ9RcEd6Fx0
+ n9Ppj0S+5TpBRwcfs+FIPCAvVTAFehuZPEdyIw8XJPstX+0r4HT1lGpPS/SmS90z
+ 572vcVilxIcRZu22hEOpijRWOsv+/DgTjHHPQKaxb9iO+o9TfH6x4Vh4wgg784aB
+ Iv9UrtEPiw==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ TpkSK6QzLdzP for <lammich@in.tum.de>; Fri, 13 Jul 2018 08:50:25 +0200 (CEST)
+Received: from BADWLRZ-SWMBX02.ads.mwn.de (BADWLRZ-SWMBX02.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::158]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX02",
+ Issuer "BADWLRZ-SWMBX02" (not verified)) by postout1.mail.lrz.de (Postfix)
+ with ESMTPS id 41Rk2n6LNwzyVn for <lammich@in.tum.de>; Fri, 13 Jul 2018
+ 08:50:25 +0200 (CEST)
+Received: from BADWLRZ-SWMBX09.ads.mwn.de (2001:4ca0:0:108::165) by
+ BADWLRZ-SWMBX02.ads.mwn.de (2001:4ca0:0:108::158) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Fri, 13 Jul 2018 08:50:24 +0200
+Received: from BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c]) by
+ BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c%12]) with mapi id
+ 15.01.1531.003; Fri, 13 Jul 2018 08:50:24 +0200
+From: "Schmitt, Katharina" <katharinaluise.schmitt@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGnVQ6YoVzyVLiU+dW5GNYnmt4A==
+Date: Fri, 13 Jul 2018 06:50:24 +0000
+Message-ID: <b612c8788fc042f78f753692be101360@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX09.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [188.174.63.189]
+Content-Type: multipart/mixed; boundary="_004_b612c8788fc042f78f753692be101360tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_b612c8788fc042f78f753692be101360tumde_
+Content-Type: multipart/alternative; boundary="_000_b612c8788fc042f78f753692be101360tumde_"
+
+
+--_000_b612c8788fc042f78f753692be101360tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Dr. Lammich,
+
+
+attached please find my homework submission for exercise sheet 13.
+
+My administrative data is the following:
+
+
+Name: Katharina Schmitt
+
+Enrollment Number: 03630761
+
+Best regards,
+
+Katharina Schmitt
+
+
+--_000_b612c8788fc042f78f753692be101360tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, &quot;EmojiFont&quot;, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
+<p></p>
+<div>
+<p>Dear Dr. Lammich,</p>
+<p><br>
+</p>
+<p>attached please find my homework submission for&nbsp;exercise sheet 13. <br>
+</p>
+<p>My administrative data is the following:</p>
+<p><br>
+</p>
+<p>Name: Katharina Schmitt</p>
+<p>Enrollment Number: 03630761</p>
+<br>
+</div>
+<div>Best regards,
+<p>Katharina Schmitt</p>
+</div>
+<br>
+<p></p>
+</div>
+</body>
+</html>
+
+--_000_b612c8788fc042f78f753692be101360tumde_--
+
+--_004_b612c8788fc042f78f753692be101360tumde_
+Content-Type: application/octet-stream; name="ex13.thy"
+Content-Description: ex13.thy
+Content-Disposition: attachment; filename="ex13.thy"; size=1290; creation-date="Fri, 13 Jul 2018 06:46:57 GMT"; modification-date="Fri, 13 Jul 2018 06:46:57 GMT"
+Content-Transfer-Encoding: base64
+
+dGhlb3J5IGV4MTMKICBpbXBvcnRzIE1haW4KYmVnaW4KCigqQW1vcnRpemVkIGNvbXBsZXhpdHk6
+IHB1c2gqKQoKZGVmaW5pdGlvbiBpbml0IDo6ICInYSBsaXN0IiB3aGVyZQoiaW5pdCA9IFtdIgoK
+ZnVuIHB1c2ggOjogIidhIFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+ICdhIGxp
+c3QiIHdoZXJlCiJwdXNoIHggeHMgPSB4ICMgeHMiCgpkZWZpbml0aW9uIHRfcHVzaCA6OiAiJ2Eg
+XDxSaWdodGFycm93PiAnYSBsaXN0IFw8UmlnaHRhcnJvdz4gbmF0IiB3aGVyZQoidF9wdXNoIHgg
+eHMgPSAxIgoKZGVmaW5pdGlvbiBcPFBoaT4gOjogIidhIGxpc3QgXDxSaWdodGFycm93PiBuYXQi
+IHdoZXJlCiJcPFBoaT4gYnMgPSBsZW5ndGgoYnMpIgoKbGVtbWEgXDxQaGk+X25vbl9uZWc6ICJc
+PFBoaT4gYnMgXDxnZT4gMCIKICBieShzaW1wIGFkZDogXDxQaGk+X2RlZikKCmxlbW1hIFw8UGhp
+Pl9pbml0OiAiXDxQaGk+IGluaXQgPSAwIgogIGJ5KHNpbXAgYWRkOiBcPFBoaT5fZGVmIGluaXRf
+ZGVmKQoKbGVtbWEgYV9wdXNoOiAidF9wdXNoIGIgYnMgKyBcPFBoaT4ocHVzaCBiIGJzKSAtIFw8
+U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path: <j.gottfriedsen@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ OpDeGDNiSFuwRwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 10:26:38 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 25E411C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 10:26:38 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 318CC1E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 10:26:36
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 21E361C04E9; Fri, 13 Jul 2018 10:26:38 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 1DF3C1C0508; Fri, 13 Jul 2018 10:26:38 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id EA9AA1C04EF for <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:37 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id DFADA1C03B8
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:37 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id DE33C1C03C8; Fri, 13 Jul 2018 10:26:37 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.2 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 3CF451C03CA
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:36 +0200 (CEST)
+Received: from postout1.mail.lrz.de (postout1.mail.lrz.de
+ [129.187.255.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 326491C03C8
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:36 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41Rm9m13CwzyYs for
+ <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:36 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531470395;
+ bh=MUYuGEK7/sSVYo0KZWiNPW+II2XNj+bKHx3BDpbYubI=; b=Abf4z2KmnNbl
+ dbvANOfmvInilrNvqIKReKRtcuzeBSEMmfL4k2xtvpnFJIdgwjfPdHdyDcvbq3uA
+ OKr1rE3k/TtckuziCeq5t9FJGEgsGSevWN0CSDCVE3BCGMLymW1/lEsbN/0ZoPHI
+ CiF21lvecrWGXcCdQB+gOhBFW9zN/RzSA1D1E1+cZU0zOREskQK3bpTcahm2vuJt
+ oB1dbfhhBnJPBOewc/xt6GnM02PTUxEaX+tsYobCaQVWJzp5E5SaOwgNQ0apaBgV
+ l18C8zZPxVnsrI8nOCREkNccHCABLCReYM6FBYBTyY+8q1gfIuW1t9dNqEf05wyL
+ lkll/4d9Ag==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ RBiyxxAy9EBV for <lammich@in.tum.de>; Fri, 13 Jul 2018 10:26:35 +0200 (CEST)
+Received: from BADWLRZ-SWMBX08.ads.mwn.de (BADWLRZ-SWMBX08.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::164]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX08",
+ Issuer "BADWLRZ-SWMBX08" (not verified)) by postout1.mail.lrz.de (Postfix)
+ with ESMTPS id 41Rm9l3LqXzyWl for <lammich@in.tum.de>; Fri, 13 Jul 2018
+ 10:26:35 +0200 (CEST)
+Received: from BADWLRZ-SWMBX07.ads.mwn.de (2001:4ca0:0:108::163) by
+ BADWLRZ-SWMBX08.ads.mwn.de (2001:4ca0:0:108::164) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Fri, 13 Jul 2018 10:26:34 +0200
+Received: from BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70]) by
+ BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70%13]) with mapi id
+ 15.01.1531.003; Fri, 13 Jul 2018 10:26:34 +0200
+From: Jakob Gottfriedsen <j.gottfriedsen@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGoL63u/l55+duUKMSRKwYRsEGA==
+Date: Fri, 13 Jul 2018 08:26:34 +0000
+Message-ID: <f3a451f22d614b869c2441e2c82174a8@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX07.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [2001:4ca0:2003:1920:dd68:4c07:e66e:abeb]
+Content-Type: multipart/mixed; boundary="_004_f3a451f22d614b869c2441e2c82174a8tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_f3a451f22d614b869c2441e2c82174a8tumde_
+Content-Type: multipart/alternative; boundary="_000_f3a451f22d614b869c2441e2c82174a8tumde_"
+
+
+--_000_f3a451f22d614b869c2441e2c82174a8tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Homework submission from Jakob Gottfriedsen
+
+--_000_f3a451f22d614b869c2441e2c82174a8tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Homework submission from Jakob Gottfriedsen<br>
+</p>
+</div>
+</body>
+</html>
+
+--_000_f3a451f22d614b869c2441e2c82174a8tumde_--
+
+--_004_f3a451f22d614b869c2441e2c82174a8tumde_
+Content-Type: application/octet-stream; name="hw13.thy"
+Content-Description: hw13.thy
+Content-Disposition: attachment; filename="hw13.thy"; size=791; creation-date="Fri, 13 Jul 2018 08:25:45 GMT"; modification-date="Fri, 13 Jul 2018 08:25:45 GMT"
+Content-Transfer-Encoding: base64
+
+dGhlb3J5IGh3MTMKICBpbXBvcnRzCiAgQ29tcGxleF9NYWluCmJlZ2luCgpmdW4gcHVzaCA6OiAi
+J2EgXDxSaWdodGFycm93PiAnYSBsaXN0IFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCIgd2hlcmUKInB1
+c2ggeCB4cyA9IHggIyB4cyIKCmZ1biBwb3AgOjogIm5hdCBcPFJpZ2h0YXJyb3c+ICdhIGxpc3Qg
+XDxSaWdodGFycm93PiAnYSBsaXN0IiB3aGVyZQoicG9wIG4geHMgPSBkcm9wIG4geHMiCgpkZWZp
+bml0aW9uIHRfcHVzaCA6OiAiJ2EgXDxSaWdodGFycm93PiAnYSBsaXN0IFw8UmlnaHRhcnJvdz4g
+bmF0IiB3aGVyZQoidF9wdXNoIHggeHMgPSAxIgoKZGVmaW5pdGlvbiB0X3BvcCA6OiAibmF0IFw8
+UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+IG5hdCIgd2hlcmUKInRfcG9wIG4geHMg
+PSBtaW4gbiAobGVuZ3RoIHhzKSIKCmZ1biBcPFBoaT4gOjogIidhIGxpc3QgXDxSaWdodGFycm93
+PiBpbnQiIHdoZXJlCiJcPFBoaT4geHMgPSBsZW5ndGggeHMiCgpsZW1tYSBcPFBoaT5fbm9uX25l
+ZzogIlw8UGhpPiB4cyBcPGdlPiAwIgogIGJ5IHNpbXAKCmxlbW1hIFw8UGhpPl9pbml0OiAiXDxQ
+aGk+IFtdID0gMCIKICBieSBzaW1wCgpsZW1tYSBhX3B1c2g6ICJ0X3B1c2ggeCB4cyArIFw8UGhp
+PiAocHVzaCB4IHhzKSAtIFw8UGhpPiB4cyA9IDIiCiAgdW5mb2xkaW5nIHRfcHVzaF9kZWYKICBi
+eSBhdXRvCgpsZW1tYSBhX3BvcDogInRfcG9wIG4geHMgKyBcPFBoaT4gKHBvcCBuIHhzKSAtIFw8
+UGhpPiB4cyA9IDAiCiAgdW5mb2xkaW5nIHRfcG9wX2RlZgogIGJ5IGF1dG8KCmVuZAo=
+
+--_004_f3a451f22d614b869c2441e2c82174a8tumde_--
+
+From s.griebel@tum.de Fri Jul 13 11:25:09 2018
+Return-Path: <s.griebel@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ 5jTvAHlvSFvgdQAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 11:25:09 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 5F0801C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 11:25:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 64EAE1E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 11:25:07
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 2A5B11C04E9; Fri, 13 Jul 2018 11:25:09 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 279FD1C050A; Fri, 13 Jul 2018 11:25:09 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 0237D1C04E9 for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:09 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id EB56A1C03B8
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:08 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id E9A231C03CA; Fri, 13 Jul 2018 11:25:08 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id A66F41C03C9
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:06 +0200 (CEST)
+Received: from postout1.mail.lrz.de (postout1.mail.lrz.de
+ [129.187.255.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 9BEA81C03C7
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:06 +0200 (CEST)
+Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by
+ postout1.mail.lrz.de (Postfix) with ESMTP id 41RnTG475pzySB for
+ <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:06 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531473906;
+ bh=zprd70EP7oMemul5sOAeCnLHiGAdiDBZIJDEdYiGdmw=; b=VNdr+ZSxLflS
+ y7wWUT9K0MGqJSMz03PnbYSIqHz6okpCM7w3T/lZULeXFzeVToerwI/Uxugx5NVf
+ XeTgRS+96IysRNf1u2ODGw/FXS8QTKgUU+rVobEzQ0solekycF2JZhu5vuHjI/Tn
+ Y6k5bsAR8TfX1qvdHqC087vNVdzatRNTBTrR6GsLkOEwhevisi8A936qC4TMh6g6
+ QZwrpkC6WGXxQ1WIGSbZkumBIaP3Ca1c487hGnaRTX2YbYV0FZ9Dxse9+DbH6RBu
+ mOH994qdQM6SkCAPmxxxm5FYrAAz/6KriEPYaOR8PSZAxVB6615aL9rvkbxs1G7e
+ aDf38iUgdQ==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.srv.lrz.de
+Received: from postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de
+ (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ wLtuplYwGGGf for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:25:06 +0200 (CEST)
+Received: from BADWLRZ-SWMBB05.ads.mwn.de (BADWLRZ-SWMBB05.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::156]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBB05",
+ Issuer "BADWLRZ-SWMBB05" (not verified)) by postout1.mail.lrz.de (Postfix)
+ with ESMTPS id 41RnTG222WzySq for <lammich@in.tum.de>; Fri, 13 Jul 2018
+ 11:25:06 +0200 (CEST)
+Received: from BADWLRZ-SWMBX01.ads.mwn.de (2001:4ca0:0:108::157) by
+ BADWLRZ-SWMBB05.ads.mwn.de (2001:4ca0:0:108::156) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Fri, 13 Jul 2018 11:25:04 +0200
+Received: from BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c]) by
+ BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c%12]) with mapi id
+ 15.01.1531.003; Fri, 13 Jul 2018 11:25:04 +0200
+From: "Griebel, Simon" <s.griebel@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGosDvZOcuKGTrUuYPFepVW2TFg==
+Date: Fri, 13 Jul 2018 09:25:04 +0000
+Message-ID: <1564d95bd0df4163bed0509a6e9c7078@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX01.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [2001:4ca0:2fff:4::4b]
+Content-Type: multipart/mixed; boundary="_004_1564d95bd0df4163bed0509a6e9c7078tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_1564d95bd0df4163bed0509a6e9c7078tumde_
+Content-Type: multipart/alternative; boundary="_000_1564d95bd0df4163bed0509a6e9c7078tumde_"
+
+
+--_000_1564d95bd0df4163bed0509a6e9c7078tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Hallo Peter,
+
+anbei meine Lsung zur Hausaufgabe 13.
+
+
+Viele Gre,
+
+Simon
+
+--_000_1564d95bd0df4163bed0509a6e9c7078tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Hallo Peter,</p>
+<p>anbei meine Lsung zur Hausaufgabe 13.</p>
+<p><br>
+</p>
+<p>Viele Gre,</p>
+<p>Simon<br>
+</p>
+</div>
+</body>
+</html>
+
+--_000_1564d95bd0df4163bed0509a6e9c7078tumde_--
+
+--_004_1564d95bd0df4163bed0509a6e9c7078tumde_
+Content-Type: application/octet-stream; name="hw13.thy"
+Content-Description: hw13.thy
+Content-Disposition: attachment; filename="hw13.thy"; size=1545; creation-date="Fri, 13 Jul 2018 09:24:46 GMT"; modification-date="Fri, 13 Jul 2018 09:24:46 GMT"
+Content-Transfer-Encoding: base64
+
+KCo8KikKdGhlb3J5IGh3MTMKaW1wb3J0cyBNYWluCmJlZ2luCigqPiopCgp0ZXh0IFw8b3Blbj5c
+SG9tZXdvcmt7QW1vcnRpemVkIENvbXBsZXhpdHl9ezEzLjA3LjIwMTh9CgogIFRoaXMgaXMgYW4g
+b2xkIGV4YW0gcXVlc3Rpb24sIHdoaWNoIHdlIGhhdmUgY29udmVydGVkIHRvIGEgaG9tZXdvcmsg
+dG8KICBiZSBkb25lIHdpdGggSXNhYmVsbGUhClw8Y2xvc2U+Cgp0ZXh0IFw8b3Blbj5BIGBgc3Rh
+Y2sgd2l0aCBtdWx0aXBvcCcnIGlzIGEgbGlzdCB3aXRoIHRoZSBmb2xsb3dpbmcgdHdvIGludGVy
+ZmFjZSBmdW5jdGlvbnM6XDxjbG9zZT4KCmZ1biBwdXNoIDo6ICInYSBcPFJpZ2h0YXJyb3c+ICdh
+IGxpc3QgXDxSaWdodGFycm93Pi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GkgOjogIidhIGxpc3QgXDxS
+aWdodGFycm93PiBuYXQiIHdoZXJlCiJwaGkgbCA9IGxlbmd0aCBsIgoKbGVtbWEgInBoaSBbXSA9
+IDAiCiAgYnkgc2ltcAoKbGVtbWEgInBoaSBsIFw8Z2U+IDAiCiAgYnkgc2ltcAoKbGVtbWEgInRf
+cHVzaCB4IGwgKyBwaGkgKHB1c2ggeCBsKSAtIHBoaSBsID0gMiIKICBieShzaW1wIGFkZDogdF9w
+dXNoX2RlZiB0X3BvcF9kZWYpCgpsZW1tYSAidF9wb3AgbiBsICsgcGhpIChwb3AgbiBsKSAtIHBo
+aSBsID0gMCIKICBieShzaW1wIGFkZDogdF9wdXNoX2RlZiB0X3BvcF9kZWYpCgooKlw8TG9uZ3Jp
+Z2h0YXJyb3c+IE1pdCAyIFw8aW4+IE8oMSkgdW5kIDAgXDxpbj4gTygxKTogcHVzaCB1bmQgcG9w
+IGhhYmVuIGVpbmUgYXJtb3J0aXNpZXJ0IGtvbnN0YW50ZSBMYXVmemVpdC4qKQoKKCo8KikKZW5k
+CigqPiop
+
+--_004_1564d95bd0df4163bed0509a6e9c7078tumde_--
+
+From ge69kel@mytum.de Fri Jul 13 11:47:17 2018
+Return-Path: <ge69kel@mytum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ 4w82ESV1SFtQPAAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 11:47:17 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 456AA1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 11:47:17 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 493E31E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 11:47:15
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 41AF21C0393; Fri, 13 Jul 2018 11:47:17 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 3E9121C04E9; Fri, 13 Jul 2018 11:47:17 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 18BAE1C03B8 for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:17 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 0DC3E1C0393
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:17 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 0C2AD1C03CA; Fri, 13 Jul 2018 11:47:17 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.2 required=7.0 tests=BAYES_00,HTML_MESSAGE,
+ RCVD_IN_DNSWL_MED autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 3DF211C03C9
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:15 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 336D51C03C7
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:15 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41Rnyq164dzyY9 for
+ <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:15 +0200 (CEST)
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ lTMRyrUjY72q for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:47:14 +0200 (CEST)
+Received: from BADWLRZ-SWMBX01.ads.mwn.de (BADWLRZ-SWMBX01.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::157]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX01",
+ Issuer "BADWLRZ-SWMBX01" (not verified)) by postout2.mail.lrz.de (Postfix)
+ with ESMTPS id 41Rnyp6X3wzyT5 for <lammich@in.tum.de>; Fri, 13 Jul 2018
+ 11:47:14 +0200 (CEST)
+Received: from BADWLRZ-SWMBX01.ads.mwn.de (2001:4ca0:0:108::157) by
+ BADWLRZ-SWMBX01.ads.mwn.de (2001:4ca0:0:108::157) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Fri, 13 Jul 2018 11:47:13 +0200
+Received: from BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c]) by
+ BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c%12]) with mapi id
+ 15.01.1531.003; Fri, 13 Jul 2018 11:47:13 +0200
+From: "Somasundaram, Arun" <ge69kel@mytum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGo4burqHVEAT5EeUybG17faoZg==
+Date: Fri, 13 Jul 2018 09:47:13 +0000
+Message-ID: <3185f0a2f051482e9b86a87e805667d4@mytum.de>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX01.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [10.149.235.88]
+Content-Type: multipart/mixed; boundary="_004_3185f0a2f051482e9b86a87e805667d4mytumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_3185f0a2f051482e9b86a87e805667d4mytumde_
+Content-Type: multipart/alternative; boundary="_000_3185f0a2f051482e9b86a87e805667d4mytumde_"
+
+
+--_000_3185f0a2f051482e9b86a87e805667d4mytumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Please find attached my submission for Homework 13
+
+
+Thank you
+
+Arun S
+
+Mk. #: 03698283
+
+--_000_3185f0a2f051482e9b86a87e805667d4mytumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Please find attached my submission for Homework 13</p>
+<p><br>
+</p>
+<p>Thank you</p>
+<p>Arun S</p>
+<p>Mk. #: 03698283</p>
+</div>
+</body>
+</html>
+
+--_000_3185f0a2f051482e9b86a87e805667d4mytumde_--
+
+--_004_3185f0a2f051482e9b86a87e805667d4mytumde_
+Content-Type: application/octet-stream; name="hw13tmpl.thy"
+Content-Description: hw13tmpl.thy
+Content-Disposition: attachment; filename="hw13tmpl.thy"; size=1060; creation-date="Fri, 13 Jul 2018 09:45:50 GMT"; modification-date="Fri, 13 Jul 2018 09:45:50 GMT"
+Content-Transfer-Encoding: base64
+
+KCo8KikKdGhlb3J5IGh3MTN0bXBsCmltcG9ydHMgTWFpbgpiZWdpbgooKj4qKQoKZnVuIHB1c2gg
+OjogIidhIFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+ICdhIGxpc3QiIHdoZXJl
+CiJwdXNoIHggeHMgPSB4ICMgeHMiCgpmdW4gcG9wIDo6ICJuYXQgXDxSaWdodGFycm93PiAnYSBs
+aXN0IFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCIgd2hlcmUKInBvcCBuIHhzID0gZHJvcCBuIHhzIgoK
+dGV4dCBcPG9wZW4+WW91IG1heSBhc3N1bWVcPGNsb3NlPgoKZGVmaW5pdGlvbiB0X3B1c2ggOjog
+IidhIFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+IG5hdCIgd2hlcmUKInRfcHVz
+aCB4IHhzID0gMSIKCmRlZmluaXRpb24gdF9wb3AgOjogIm5hdCBcPFJpZ2h0YXJyb3c+ICdhIGxp
+c3QgXDxSaWdodGFycm93PiBuYXQiIHdoZXJlCiJ0X3BvcCBuIHhzID0gbWluIG4gKGxlbmd0aCB4
+cykiCgpkZWZpbml0aW9uIFw8UGhpPiA6OiAiJ2EgbGlzdCBcPFJpZ2h0YXJyb3c+IGludCIgd2hl
+cmUKIlw8UGhpPiBicyA9IGludChsZW5ndGggYnMpIgoKbGVtbWEgXDxQaGk+X25vbl9uZWc6ICJc
+PFBoaT4gYnMgXDxnZT4gMCIKYnkoc2ltcCBhZGQ6IFw8UGhpPl9kZWYpCgpkZWZpbml0aW9uICJp
+bml0ID0gW10iCgpsZW1tYSBcPFBoaT5faW5pdDogIlw8UGhpPiBpbml0ID0gMCIKICBieShzaW1w
+IGFkZDogXDxQaGk+X2RlZiBpbml0X2RlZikKCmxlbW1hIHB1c2hfY29uc3Q6ICJpbnQodF9wdXNo
+IHggeHMpICArIFw8UGhpPihwdXNoIHggeHMpIC0gXDxQaGk+IHhzID0gMiIKYXBwbHkoaW5kdWN0
+aW9uIHhzIHJ1bGU6IHB1c2guaW5kdWN0KQogIGFwcGx5IChhdXRvIHNpbXAgYWRkOiBcPFBoaT5f
+ZGVmIHRfcHVzaF9kZWYpCiAgZG9uZQoKbGVtbWEgcG9wX2NvbnN0OiAiaW50KHRfcG9wIG4geHMp
+ICsgXDxQaGk+KHBvcCBuIHhzKSAtIFw8UGhpPiB4cyA9IDAiCiAgYXBwbHkoaW5kdWN0aW9uIHhz
+IHJ1bGU6IHBvcC5pbmR1Y3QpCiAgYXBwbHkgKGF1dG8gc2ltcCBhZGQ6IFw8UGhpPl9kZWYgdF9w
+b3BfZGVmKQogIGRvbmUKCigqPCopCmVuZAooKj4qKQoKCg==
+
+--_004_3185f0a2f051482e9b86a87e805667d4mytumde_--
+
+From ga53qud@mytum.de Fri Jul 13 11:51:25 2018
+Return-Path: <ga53qud@mytum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ NSNzMqt1SFvOQwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Fri, 13 Jul 2018 11:51:25 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 84D871C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Fri, 13 Jul 2018
+ 11:51:25 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 886F21E0127
+ for <lammich@mail.informatik.tu-muenchen.de>; Fri, 13 Jul 2018 11:51:23
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 8104E1C0393; Fri, 13 Jul 2018 11:51:25 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 7ECB41C04E9; Fri, 13 Jul 2018 11:51:25 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 582221C03B8 for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:25 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 4DB411C0393
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:25 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 4BC741C2DD5; Fri, 13 Jul 2018 11:51:25 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-3.2 required=7.0
+ tests=AWL,BAYES_00,DEAR_SOMETHING, HTML_MESSAGE,RCVD_IN_DNSWL_MED
+ autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id 822301C2DD4
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:23 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id 772281C2DD0
+ for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:23 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41Rp3b33sHzyYL for
+ <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:23 +0200 (CEST)
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ s_OwFUyUBkMO for <lammich@in.tum.de>; Fri, 13 Jul 2018 11:51:23 +0200 (CEST)
+Received: from BADWLRZ-SWMBX09.ads.mwn.de (BADWLRZ-SWMBX09.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::165]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX09",
+ Issuer "BADWLRZ-SWMBX09" (not verified)) by postout2.mail.lrz.de (Postfix)
+ with ESMTPS id 41Rp3b1Tc0zyY9 for <lammich@in.tum.de>; Fri, 13 Jul 2018
+ 11:51:23 +0200 (CEST)
+Received: from BADWLRZ-SWMBX01.ads.mwn.de (2001:4ca0:0:108::157) by
+ BADWLRZ-SWMBX09.ads.mwn.de (2001:4ca0:0:108::165) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Fri, 13 Jul 2018 11:51:21 +0200
+Received: from BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c]) by
+ BADWLRZ-SWMBX01.ads.mwn.de ([fe80::7d02:f283:edbd:b19c%12]) with mapi id
+ 15.01.1531.003; Fri, 13 Jul 2018 11:51:21 +0200
+From: "Das Sharma, Amartya" <ga53qud@mytum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Homework 13
+Thread-Topic: [FDS] Homework 13
+Thread-Index: AQHUGo7ja5M2q3te8EK3bcr/RyflLw==
+Date: Fri, 13 Jul 2018 09:51:21 +0000
+Message-ID: <b00668ae00d5408087c5e738684389f9@mytum.de>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX01.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [212.204.102.86]
+Content-Type: multipart/mixed; boundary="_004_b00668ae00d5408087c5e738684389f9mytumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_b00668ae00d5408087c5e738684389f9mytumde_
+Content-Type: multipart/alternative; boundary="_000_b00668ae00d5408087c5e738684389f9mytumde_"
+
+
+--_000_b00668ae00d5408087c5e738684389f9mytumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear sir,
+
+
+Please find attached my homework 13.
+
+
+Regards,
+
+Amartya Das Sharma
+
+--_000_b00668ae00d5408087c5e738684389f9mytumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear sir,</p>
+<p><br>
+</p>
+<p>Please find attached my homework 13.</p>
+<p><br>
+</p>
+<p>Regards,</p>
+<p>Amartya Das Sharma<br>
+</p>
+</div>
+</body>
+</html>
+
+--_000_b00668ae00d5408087c5e738684389f9mytumde_--
+
+--_004_b00668ae00d5408087c5e738684389f9mytumde_
+Content-Type: application/octet-stream; name="hw13tmpl.thy"
+Content-Description: hw13tmpl.thy
+Content-Disposition: attachment; filename="hw13tmpl.thy"; size=1035; creation-date="Fri, 13 Jul 2018 09:50:45 GMT"; modification-date="Fri, 13 Jul 2018 09:50:45 GMT"
+Content-Transfer-Encoding: base64
+
+dGhlb3J5IGh3MTN0bXBsCmltcG9ydHMgTWFpbgpiZWdpbgoKCmZ1biBwdXNoIDo6ICInYSBcPFJp
+Z2h0YXJyb3c+ICdhIGxpc3QgXDxSaWdodGFycm93PiAnYSBsaXN0IiB3aGVyZQoicHVzaCB4IHhz
+ID0geCAjIHhzIgoKZnVuIHBvcCA6OiAibmF0IFw8UmlnaHRhcnJvdz4gJ2EgbGlzdCBcPFJpZ2h0
+YXJyb3c+ICdhIGxpc3QiIHdoZXJlCiJwb3AgbiB4cyA9IGRyb3AgbiB4cyIKCnRleHQgXDxvcGVu
+PllvdSBtYXkgYXNzdW1lXDxjbG9zZT4KCmRlZmluaXRpb24gdF9wdXNoIDo6ICInYSBcPFJpZ2h0
+YXJyb3c+ICdhIGxpc3QgXDxSaWdodGFycm93PiBuYXQiIHdoZXJlCiJ0X3B1c2ggeCB4cyA9IDEi
+CgpkZWZpbml0aW9uIHRfcG9wIDo6ICJuYXQgXDxSaWdodGFycm93PiAnYSBsaXN0IFw8UmlnaHRh
+cnJvdz4gbmF0IiB3aGVyZQoidF9wb3AgbiB4cyA9IG1pbiBuIChsZW5ndGggeHMpIgoKZGVmaW5p
+dGlvbiBcPFBoaT4gOjogIidhIGxpc3QgXDxSaWdodGFycm93PiBpbnQiIHdoZXJlCiJcPFBoaT4g
+YnMgPSBpbnQobGVuZ3RoIGJzKSIKCmxlbW1hIFw8UGhpPl9ub25fbmVnOiAiXDxQaGk+IGJzIFw8
+Z2U+IDAiCmJ5KHNpbXAgYWRkOiBcPFBoaT5fZGVmKQoKZGVmaW5pdGlvbiAiaW5pdCA9IFtdIgoK
+bGVtbWEgXDxQaGk+X2luaXQ6ICJcPFBoaT4gaW5pdCA9IDAiCmJ5KHNpbXAgYWRkOiBcPFBoaT5f
+ZGVmIGluaXRfZGVmKQoKbGVtbWEgcHVzaF9jb25zdDogImludCh0X3B1c2ggeCB4cykgICsgXDxQ
+aGk+KHB1c2ggeCB4cykgLSBcPFBoaT4geHMgPSAyIgphcHBseShpbmR1Y3Rpb24geHMgcnVsZTog
+cHVzaC5pbmR1Y3QpCiAgYXBwbHkgKGF1dG8gc2ltcCBhZGQ6IFw8UGhpPl9kZWYgdF9wdXNoX2Rl
+ZikKICBkb25lCgpsZW1tYSBwb3BfY29uc3Q6ICJpbnQodF9wb3AgbiB4cykgKyBcPFBoaT4ocG9w
+IG4geHMpIC0gXDxQaGk+IHhzID0gMCIKICBhcHBseShpbmR1Y3Rpb24geHMgcnVsZTogcG9wLmlu
+ZHVjdCkKICBhcHBseSAoYXV0byBzaW1wIGFkZDogXDxQaGk+X2RlZiB0X3BvcF9kZWYpCiAgZG9u
+ZQoKZW5kCgoK
+
+--_004_b00668ae00d5408087c5e738684389f9mytumde_--
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+a.putwattana@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,67 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13
+imports Complex_Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+  "\<Phi> bs = length bs"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> [] = 0"
+by(simp add: \<Phi>_def)
+
+lemma a_push : "t_push x bs + \<Phi> (push x bs) - \<Phi> bs = 2"
+  unfolding t_push_def \<Phi>_def
+  apply (induction x bs rule: push.induct)
+  apply (simp)
+  done
+
+lemma a_pop : "t_pop n bs + \<Phi> (pop n bs) - \<Phi> bs = 0"
+  unfolding t_pop_def \<Phi>_def
+  apply (induction n bs rule: pop.induct)
+  apply (simp)
+  done
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/msg-5282-2.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,9 @@
+Dear Dr. Peter Lammich,
+
+
+This is my solution to homework 13.
+
+
+Best regards,
+
+Attakorn Putwattana
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/a.putwattana@tum.de_2/msg-5282-3.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,18 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear Dr. Peter Lammich,</p>
+<p><br>
+</p>
+<p>This is my solution to homework 13.</p>
+<p><br>
+</p>
+<p>Best regards,</p>
+<p>Attakorn Putwattana</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+alexejrotar@gmail.com
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,59 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+text \<open>The potential function is \<open>length::list \<Rightarrow> nat\<close>. The first two proof obligations for \<Phi> are then trivial:\<close>
+
+lemma "length xs \<ge> 0" by simp
+
+lemma "length [] = 0" by simp
+
+text \<open>The amortized costs for both functions are 2.\<close>
+
+lemma "t_push x xs + length (push x xs) - length xs \<le> 2"
+  by (induction xs) (auto simp: t_push_def)
+
+lemma "t_pop n xs + length (pop n xs) - length xs \<le> 2"
+  by (induction xs) (auto simp: t_pop_def)
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/alexejrotar@gmail.com_1/msg-5282-1.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+clemens.jonischkeit@yahoo.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/jonischkeit13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,96 @@
+(** Score: 5/5
+*)
+(*<*)
+theory jonischkeit13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition init :: "'a list" where
+"init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> as = int (length as)"
+
+lemma phi_init:
+  "\<Phi> init = 0" unfolding init_def \<Phi>_def by simp
+
+lemma phi_ge0:
+  "\<Phi> xs \<ge> 0" unfolding \<Phi>_def by simp
+
+lemma a_push:
+  "int (t_push x xs) + \<Phi> (push x xs) - \<Phi> xs = 2"
+  unfolding t_push_def \<Phi>_def by auto
+
+lemma a_pop:
+  "int (t_pop n xs) + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  unfolding t_pop_def \<Phi>_def by simp
+
+datatype 'a opr = PUSH 'a | POP nat
+
+fun execute :: "'a list \<Rightarrow> ('a opr) list \<Rightarrow> 'a list" where
+"execute as [] = as" |
+"execute as ((PUSH a) # xs) = execute (push a as) xs" |
+"execute as ((POP n) # xs) = execute (pop n as) xs"
+
+fun t_execute :: "'a list \<Rightarrow> ('a opr) list \<Rightarrow> nat" where
+"t_execute _ [] = 0" |
+"t_execute as ((PUSH a) # xs) = t_execute (push a as) xs + t_push a as" |
+"t_execute as ((POP n) # xs) = t_execute (pop n as) xs + t_pop n as"
+
+lemma add_nat:
+  "a + b = b + (a :: nat)"
+  by auto
+
+lemma t_execute_aux:
+  "int (t_execute as ops) \<le> 2 * int (length ops) + \<Phi> (as) - \<Phi> (execute as ops)"
+proof (induction as ops rule: execute.induct)
+  case (1 as)
+then show ?case by simp
+next
+  case (2 as a xs)
+  then show ?case using a_push[of a as] by auto
+next
+  case (3 as n xs)
+  then show ?case using a_pop[of n as] by auto
+qed
+
+lemma "t_execute init ops \<le> 2 * length ops"
+  using t_execute_aux[of init ops] phi_init
+  by (smt mult_2 of_nat_add of_nat_le_iff phi_ge0)
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+(*<*)
+end
+(*>*)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/clemens.jonischkeit@yahoo.de_3/msg-5282-4.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,6 @@
+Hi,
+
+please find my submission of Homework 13 attached to this email
+
+best,
+Clemens
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+daniel.kutasi@outlook.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,65 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13
+imports Complex_Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+  "init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> xs = length xs"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by(simp add: \<Phi>_def init_def)
+
+lemma a_push: "t_push x xs + \<Phi>(push x xs) - \<Phi> xs = 2"
+  apply (induction xs rule: push.induct)
+  by (simp_all add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n xs + \<Phi>(pop n xs) - \<Phi> xs = 0"
+  apply (induction xs rule: push.induct)
+  by (simp_all add: \<Phi>_def t_pop_def)
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/msg-5282-5.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,2 @@
+ga68zak
+03623674
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/daniel.kutasi@outlook.de_4/msg-5282-6.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+<div dir="ltr">ga68zak
+<div>03623674</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+eric.koepke@online.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,63 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+
+text \<open>First we define a potential function, then we show that the armortized complexity
+     which is the actual cost in addition to the change in potential is constant for all
+     operations. Additionally the potential of the empty stack should be 0.\<close>
+
+definition pot :: "'a list \<Rightarrow> nat" where
+"pot xs = length xs"
+
+lemma "pot [] = 0"
+  by (simp add: pot_def)
+
+lemma "t_push x xs + pot (push x xs) - pot xs = Suc (Suc 0)"
+  by (simp add: pot_def t_push_def)
+
+lemma "t_pop n xs + pot (pop n xs) - pot xs = 0"
+    by (simp add: pot_def t_pop_def)
+
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/eric.koepke@online.de_5/msg-5282-7.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,5 @@
+Find the homework attached.
+Matr: 03665531
+
+Greetings,
+Eric Koepke
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/extr.log	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,65 @@
+Message: msg0 (extr/alexejrotar@gmail.com)
+    Part: msg0/msg-5282-1.txt (text/plain)
+    Part: msg0/hw13.thy (text/plain)
+Message: msg1 (extr/a.putwattana@tum.de)
+    Part: msg1/msg-5282-2.txt (text/plain)
+    Part: msg1/msg-5282-3.html (text/html)
+    Part: msg1/hw13.thy (application/octet-stream)
+Message: msg2 (extr/clemens.jonischkeit@yahoo.de)
+    Part: msg2/msg-5282-4.txt (text/plain)
+    Part: msg2/jonischkeit13.thy (text/plain)
+Message: msg3 (extr/daniel.kutasi@outlook.de)
+    Part: msg3/msg-5282-5.txt (text/plain)
+    Part: msg3/msg-5282-6.html (text/html)
+    Part: msg3/hw13.thy (application/octet-stream)
+Message: msg4 (extr/eric.koepke@online.de)
+    Part: msg4/msg-5282-7.txt (text/plain)
+    Part: msg4/hw13.thy (application/octet-stream)
+Message: msg5 (extr/felix.wielander@tum.de)
+    Part: msg5/msg-5282-8.txt (text/plain)
+    Part: msg5/hw13tmpl.thy (text/plain)
+Message: msg6 (extr/florian.stamer@tum.de)
+    Part: msg6/msg-5282-9.txt (text/plain)
+    Part: msg6/msg-5282-10.html (text/html)
+    Part: msg6/ex13.thy (application/octet-stream)
+Message: msg7 (extr/ga53qud@mytum.de)
+    Part: msg7/msg-5282-11.txt (text/plain)
+    Part: msg7/msg-5282-12.html (text/html)
+    Part: msg7/hw13tmpl.thy (application/octet-stream)
+Message: msg8 (extr/ge69kel@mytum.de)
+    Part: msg8/msg-5282-13.txt (text/plain)
+    Part: msg8/msg-5282-14.html (text/html)
+    Part: msg8/hw13tmpl.thy (application/octet-stream)
+Message: msg9 (extr/j.gottfriedsen@tum.de)
+    Part: msg9/msg-5282-15.txt (text/plain)
+    Part: msg9/msg-5282-16.html (text/html)
+    Part: msg9/hw13.thy (application/octet-stream)
+Message: msg10 (extr/j.v.mutius@gmail.com)
+    Part: msg10/msg-5282-17.txt (text/plain)
+    Part: msg10/hw13tmpl.thy (text/plain)
+Message: msg11 (extr/katharinaluise.schmitt@tum.de)
+    Part: msg11/msg-5282-18.txt (text/plain)
+    Part: msg11/msg-5282-19.html (text/html)
+    Part: msg11/ex13.thy (application/octet-stream)
+Message: msg12 (extr/martin.rau@tum.de)
+    Part: msg12/msg-5282-20.txt (text/plain)
+    Part: msg12/Home13.thy (text/plain)
+Message: msg13 (extr/mitja.krebs@tum.de)
+    Part: msg13/msg-5282-21.txt (text/plain)
+    Part: msg13/hw13tmpl.thy (application/octet-stream)
+Message: msg14 (extr/m.kirchmeier@tum.de)
+    Part: msg14/msg-5282-22.txt (text/plain)
+    Part: msg14/hw13tmpl.thy (text/plain)
+Message: msg15 (extr/sabine.rieder@tum.de)
+    Part: msg15/msg-5282-23.txt (text/plain)
+    Part: msg15/msg-5282-24.html (text/html)
+    Part: msg15/hw13tmpl.thy (application/octet-stream)
+Message: msg16 (extr/s.griebel@tum.de)
+    Part: msg16/msg-5282-25.txt (text/plain)
+    Part: msg16/msg-5282-26.html (text/html)
+    Part: msg16/hw13.thy (application/octet-stream)
+Message: msg17 (extr/smith.nickh@gmail.com)
+    Part: msg17/msg-5282-27.txt (text/plain)
+    Part: msg17/msg-5282-28.html (text/html)
+    Part: msg17/HW13.thy (application/octet-stream)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+felix.wielander@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,70 @@
+(** Score: 1/5
+*)
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+  "init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> xs = length xs"
+
+lemma gte_zero: "\<Phi> xs \<ge> 0"
+  apply (induction xs)
+  by auto
+
+lemma init_zero: "\<Phi> init = 0"
+  unfolding init_def by (simp add: \<Phi>_def)
+
+(* f\<^sub>1 = push, f\<^sub>2 = pop *)
+(* s\<^sub>0 := init, s\<^sub>1 = f\<^sub>1 s\<^sub>0, s\<^sub>2 = f\<^sub>2 s\<^sub>1 *)
+
+(* a\<^sub>2 = t_pop s\<^sub>1 + \<Phi> s\<^sub>2 - \<Phi> s\<^sub>1 *)
+(* a\<^sub>1 = t_push s\<^sub>0 + \<Phi> s\<^sub>1 - \<Phi> s\<^sub>0 *)
+
+(* a\<^sub>1 + a\<^sub>2 = 1 + (-1) = 0 *)
+
+lemma "(t_push x init + \<Phi> (push x init) - \<Phi> init) + (t_pop n (push x init) + \<Phi> (pop n (push x init)) - \<Phi> (push x init)) = 2"
+  apply auto
+  sorry
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/felix.wielander@tum.de_6/msg-5282-8.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+florian.stamer@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/ex13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,53 @@
+(** Score: 5/5
+*)
+(*<*)
+theory ex13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition \<Phi> :: "'a list \<Rightarrow> nat"
+  where "\<Phi> xs = length xs"
+
+
+lemma armort_push: "t_push x xs + \<Phi> (push x xs) - \<Phi> xs \<le> 2"
+  by (induction xs arbitrary: x) (auto simp: t_push_def \<Phi>_def)
+
+lemma armort_pop: "t_pop k xs + \<Phi> (pop k xs) - \<Phi> xs \<le> 0"
+  by (induction xs arbitrary: k) (auto simp: t_pop_def \<Phi>_def)
+
+(*<*)
+end
+(*>*)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/msg-5282-10.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,18 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
+<p>Dear Mr. Lammich,</p>
+<p><br>
+</p>
+<p>the .thy file for exercise 13 is in the attachments.</p>
+<p><br>
+</p>
+<p>Best regards</p>
+<p>Florian Stamer [03664701]</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/florian.stamer@tum.de_7/msg-5282-9.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,9 @@
+Dear Mr. Lammich,
+
+
+the .thy file for exercise 13 is in the attachments.
+
+
+Best regards
+
+Florian Stamer [03664701]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+ga53qud@mytum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,45 @@
+(** Score: 5/5
+*)
+theory hw13tmpl
+imports Main
+begin
+
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> bs = int(length bs)"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+definition "init = []"
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+by(simp add: \<Phi>_def init_def)
+
+lemma push_const: "int(t_push x xs)  + \<Phi>(push x xs) - \<Phi> xs = 2"
+apply(induction xs rule: push.induct)
+  apply (auto simp add: \<Phi>_def t_push_def)
+  done
+
+lemma pop_const: "int(t_pop n xs) + \<Phi>(pop n xs) - \<Phi> xs = 0"
+  apply(induction xs rule: pop.induct)
+  apply (auto simp add: \<Phi>_def t_pop_def)
+  done
+
+end
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/msg-5282-11.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,9 @@
+Dear sir,
+
+
+Please find attached my homework 13.
+
+
+Regards,
+
+Amartya Das Sharma
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ga53qud@mytum.de_8/msg-5282-12.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,19 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear sir,</p>
+<p><br>
+</p>
+<p>Please find attached my homework 13.</p>
+<p><br>
+</p>
+<p>Regards,</p>
+<p>Amartya Das Sharma<br>
+</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+ge69kel@mytum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,48 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> bs = int(length bs)"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+definition "init = []"
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by(simp add: \<Phi>_def init_def)
+
+lemma push_const: "int(t_push x xs)  + \<Phi>(push x xs) - \<Phi> xs = 2"
+apply(induction xs rule: push.induct)
+  apply (auto simp add: \<Phi>_def t_push_def)
+  done
+
+lemma pop_const: "int(t_pop n xs) + \<Phi>(pop n xs) - \<Phi> xs = 0"
+  apply(induction xs rule: pop.induct)
+  apply (auto simp add: \<Phi>_def t_pop_def)
+  done
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/msg-5282-13.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,8 @@
+Please find attached my submission for Homework 13
+
+
+Thank you
+
+Arun S
+
+Mk. #: 03698283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/ge69kel@mytum.de_9/msg-5282-14.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,16 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Please find attached my submission for Homework 13</p>
+<p><br>
+</p>
+<p>Thank you</p>
+<p>Arun S</p>
+<p>Mk. #: 03698283</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+j.gottfriedsen@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,37 @@
+(** Score: 5/5
+*)
+theory hw13
+  imports
+  Complex_Main
+begin
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+fun \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> xs = length xs"
+
+lemma \<Phi>_non_neg: "\<Phi> xs \<ge> 0"
+  by simp
+
+lemma \<Phi>_init: "\<Phi> [] = 0"
+  by simp
+
+lemma a_push: "t_push x xs + \<Phi> (push x xs) - \<Phi> xs = 2"
+  unfolding t_push_def
+  by auto
+
+lemma a_pop: "t_pop n xs + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  unfolding t_pop_def
+  by auto
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/msg-5282-15.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+Homework submission from Jakob Gottfriedsen
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.gottfriedsen@tum.de_10/msg-5282-16.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,12 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Homework submission from Jakob Gottfriedsen<br>
+</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+j.v.mutius@gmail.com
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,61 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+"init \<equiv> []"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> \<equiv> length"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0" unfolding \<Phi>_def by simp
+lemma \<Phi>_init: "\<Phi> init = 0" unfolding \<Phi>_def init_def by simp
+
+lemma a_push: "t_push x xs + \<Phi> (push x xs) - \<Phi> xs = 2"
+  unfolding \<Phi>_def t_push_def
+  by simp
+
+lemma a_pop: "t_pop n xs + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  unfolding \<Phi>_def t_pop_def
+  by simp
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/j.v.mutius@gmail.com_11/msg-5282-17.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,5 @@
+Dear Mr. Lammich,
+attached is my submission for Homework 13
+
+Regards,
+Joshua von Mutius
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+katharinaluise.schmitt@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/ex13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,61 @@
+(** Score: 3/5
+
+  You must not use a different potential function for different operations!
+
+  Note, however, that your \<Phi> and \<Phi>' are actually equal, as max (0::nat) x = x!
+
+  Also min (0::nat) x = 0 !
+
+*)
+theory ex13
+  imports Main
+begin
+
+(*Amortized complexity: push*)
+
+definition init :: "'a list" where
+"init = []"
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+"\<Phi> bs = length(bs)"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+  by(simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by(simp add: \<Phi>_def init_def)
+
+lemma a_push: "t_push b bs + \<Phi>(push b bs) - \<Phi> bs = 2"
+  apply(induction bs)
+  apply(simp_all add: \<Phi>_def t_push_def)
+  done
+
+(*Amortized complexity: pop*)
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition \<Phi>' :: "'a list \<Rightarrow> nat" where
+"\<Phi>' bs = max 0 (length(bs))"
+
+lemma \<Phi>'_non_neg: "\<Phi>' bs \<ge> 0"
+  by(simp add: \<Phi>'_def)
+
+lemma \<Phi>'_init: "\<Phi>' init = 0"
+  by(simp add: \<Phi>'_def init_def)
+
+lemma a_pop: "t_pop n xs + \<Phi>'(pop n xs) - \<Phi>' xs = min 0 ((length xs) - n)"
+  apply(induction xs)
+  apply(simp_all add: \<Phi>'_def t_pop_def)
+  done
+
+end
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/msg-5282-18.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,16 @@
+Dear Dr. Lammich,
+
+
+attached please find my homework submission for exercise sheet 13.
+
+My administrative data is the following:
+
+
+Name: Katharina Schmitt
+
+Enrollment Number: 03630761
+
+Best regards,
+
+Katharina Schmitt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/katharinaluise.schmitt@tum.de_12/msg-5282-19.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,29 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, &quot;EmojiFont&quot;, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
+<p></p>
+<div>
+<p>Dear Dr. Lammich,</p>
+<p><br>
+</p>
+<p>attached please find my homework submission for&nbsp;exercise sheet 13. <br>
+</p>
+<p>My administrative data is the following:</p>
+<p><br>
+</p>
+<p>Name: Katharina Schmitt</p>
+<p>Enrollment Number: 03630761</p>
+<br>
+</div>
+<div>Best regards,
+<p>Katharina Schmitt</p>
+</div>
+<br>
+<p></p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+m.kirchmeier@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,93 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13tmpl
+imports Complex_Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+"init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+"\<Phi> xs = length xs"
+
+lemma \<Phi>_non_neg: "\<Phi> bs \<ge> 0"
+by(simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+by(simp add: \<Phi>_def init_def)
+
+lemma a_push: "t_push x xs + \<Phi>(push x xs) - \<Phi> xs = 2"
+  by (induction xs) (simp_all add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n xs + \<Phi>(pop n xs) - \<Phi> xs = 0"
+  by (induction xs) (simp_all add: \<Phi>_def t_pop_def)
+
+datatype 'a opr = PUSH 'a | POP nat
+
+fun execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> 'a list" where
+  "execute xs [] = xs"
+| "execute xs (PUSH x # ops) = execute (push x xs) ops"
+| "execute xs (POP n # ops) = execute (pop n xs) ops"
+
+fun t_execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> nat" where
+  "t_execute xs [] = 0"
+| "t_execute xs (PUSH x # ops) = t_push x xs + t_execute (push x xs) ops"
+| "t_execute xs (POP n # ops) = t_pop n xs + t_execute (pop n xs) ops"
+
+lemmas [simp del] = push.simps pop.simps
+
+lemma t_execute_aux: "t_execute xs ops \<le> 2*length ops + \<Phi> xs - \<Phi> (execute xs ops)"
+proof (induction xs ops rule: execute.induct)
+  case (1 xs)
+  then show ?case by simp
+next
+  case (2 xs x ops)
+  then show ?case using a_push[of x xs] by simp
+next
+  case (3 xs n ops)
+  then show ?case using a_pop[of n xs] by simp
+qed
+
+lemma t_execute: "t_execute init ops \<le> 2*length ops"
+  using t_execute_aux[of init ops] \<Phi>_non_neg[of "execute init ops"]
+  by (auto simp: \<Phi>_init)
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/m.kirchmeier@tum.de_15/msg-5282-22.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,6 @@
+Hallo Peter,
+
+anbei noch die Hausaufgabe.
+
+Viele Grüße
+Max
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/Home13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,108 @@
+(** Score: 5/5
+*)
+theory Home13
+imports Main
+begin
+
+(* Homework 13 Amortized Complexity *)
+
+definition init :: "'a list" where
+  "init = []"
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+  "push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+  "pop n xs = drop n xs"
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+  "t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+  "t_pop n xs = min n (length xs)"
+
+definition \<Phi> :: "'a list \<Rightarrow> nat" where
+  "\<Phi> xs = length xs"
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by (simp add: \<Phi>_def init_def)
+
+lemma \<Phi>_non_neg: "\<Phi> s \<ge> 0"
+  by simp
+
+lemma a_push: "t_push x s + \<Phi>(push x s) - \<Phi> s = 2"
+  by (cases s) (auto simp add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n s + \<Phi>(pop n s) - \<Phi> s = 0"
+  by (cases s) (auto simp add: \<Phi>_def t_pop_def)
+
+datatype 'a opr = PUSH 'a | POP nat
+
+fun execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> 'a list" where
+  "execute s [] = s"
+| "execute s (PUSH x # ops) = execute (push x s) ops"
+| "execute s (POP n # ops) = execute (pop n s) ops"
+
+fun t_execute :: "'a list \<Rightarrow> 'a opr list \<Rightarrow> nat" where
+  "t_execute s [] = 0"
+| "t_execute s (PUSH x # ops) = t_push x s + t_execute (push x s) ops"
+| "t_execute s (POP n # ops) = t_pop n s + t_execute (pop n s) ops"
+
+lemma a_push': "t_push x s = 2 + \<Phi> s - \<Phi>(push x s)"
+  by (cases s) (auto simp add: \<Phi>_def t_push_def)
+
+lemma a_pop': "t_pop n s = \<Phi> s - \<Phi> (pop n s)"
+  by (cases s) (auto simp add: \<Phi>_def t_pop_def)
+
+lemma aux1: "\<Phi> (execute s ops) \<le> 2 * length ops + \<Phi> s"
+  by (induction s ops rule: execute.induct) (auto simp add: \<Phi>_def)
+
+lemma aux2: "\<Phi> (push x s) \<le> 2 + \<Phi> s"
+  by (induction s) (auto simp add: \<Phi>_def)
+
+lemma aux3: "\<Phi> (pop n s) \<le> \<Phi> s"
+  by (induction s) (auto simp add: \<Phi>_def)
+
+lemmas [simp del] = push.simps pop.simps
+
+lemma t_execute_aux: "t_execute s ops \<le> 2 * length ops + \<Phi> s - \<Phi> (execute s ops)"
+proof (induction s ops rule: execute.induct)
+  case (1 s)
+  then show ?case by simp
+next
+  case (2 s x ops)
+  have "t_execute s (PUSH x # ops) = t_push x s + t_execute (push x s) ops"
+    by simp
+  also have "... \<le> t_push x s + (2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops))"
+    using 2 by simp
+  also have "... = (2 + \<Phi> s - \<Phi> (push x s)) + (2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops))"
+    using a_push' by simp
+  also have "... = 2 + \<Phi> s - \<Phi> (push x s) + 2 * length ops + \<Phi> (push x s) - \<Phi> (execute (push x s) ops)"
+    using aux1 by (simp add: aux1 add.assoc)
+  also have "... = 2 + 2 * length ops + \<Phi> s - \<Phi> (execute (push x s) ops)"
+    using aux2 by (metis le_add_diff_inverse2 semiring_normalization_rules(23))
+  also have "... = 2 * length (PUSH x # ops) + \<Phi> s - \<Phi> (execute s (PUSH x # ops))"
+    by simp
+  finally show ?case .
+next
+  case (3 s n ops)
+  have "t_execute s (POP n # ops) = t_pop n s + t_execute (pop n s) ops"
+    by simp
+  also have "... \<le> t_pop n s + (2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops))"
+    using 3 by simp
+  also have "... = (\<Phi> s - \<Phi> (pop n s)) + (2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops))"
+    using a_pop' by simp
+  also have "... = \<Phi> s - \<Phi> (pop n s) + 2 * length ops + \<Phi> (pop n s) - \<Phi> (execute (pop n s) ops)"
+    by (simp add: aux1 semiring_normalization_rules(21))
+  also have "... = 2 * length ops + \<Phi> s - \<Phi> (execute (pop n s) ops)"
+    using aux3 by (metis diff_add semiring_normalization_rules(23) semiring_normalization_rules(24))
+  also have "... \<le> 2 * length (POP n # ops) + \<Phi> s - \<Phi> (execute s (POP n # ops))"
+    by simp
+  finally show ?case .
+qed
+
+lemma t_execute: "t_execute init ops \<le> 2 * length ops"
+  using t_execute_aux[of init ops] \<Phi>_non_neg[of "execute init ops"]
+  by (simp add: \<Phi>_init)
+
+end
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+martin.rau@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/martin.rau@tum.de_13/msg-5282-20.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/meta.csv	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,18 @@
+1,alexejrotar@gmail.com
+2,a.putwattana@tum.de
+3,clemens.jonischkeit@yahoo.de
+4,daniel.kutasi@outlook.de
+5,eric.koepke@online.de
+6,felix.wielander@tum.de
+7,florian.stamer@tum.de
+8,ga53qud@mytum.de
+9,ge69kel@mytum.de
+10,j.gottfriedsen@tum.de
+11,j.v.mutius@gmail.com
+12,katharinaluise.schmitt@tum.de
+13,martin.rau@tum.de
+14,mitja.krebs@tum.de
+15,m.kirchmeier@tum.de
+16,sabine.rieder@tum.de
+17,s.griebel@tum.de
+18,smith.nickh@gmail.com
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+mitja.krebs@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,63 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13tmpl
+imports Complex_Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+definition init :: "'a list" where
+  "init = []"
+
+definition \<Phi> :: "'a list \<Rightarrow> int" where
+  "\<Phi> xs = length xs"
+
+lemma \<Phi>_non_neg: "\<Phi> xs \<ge> 0"
+  by (simp add: \<Phi>_def)
+
+lemma \<Phi>_init: "\<Phi> init = 0"
+  by (simp add: \<Phi>_def init_def)
+
+lemma a_push: "t_push x xs + \<Phi> (push x xs) - \<Phi> xs = 2"
+  by (simp add: \<Phi>_def t_push_def)
+
+lemma a_pop: "t_pop n xs + \<Phi> (pop n xs) - \<Phi> xs = 0"
+  by (simp add: \<Phi>_def t_pop_def)
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/mitja.krebs@tum.de_14/msg-5282-21.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,6 @@
+Sehr geehrter Herr Dr. Lammich,
+
+anbei finden Sie meinen Lösungsvorschlag zur Hausaufgabe 13.
+
+Mit freundlichen Grüßen
+Mitja Krebs
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+s.griebel@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/hw13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,62 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+
+
+fun phi :: "'a list \<Rightarrow> nat" where
+"phi l = length l"
+
+lemma "phi [] = 0"
+  by simp
+
+lemma "phi l \<ge> 0"
+  by simp
+
+lemma "t_push x l + phi (push x l) - phi l = 2"
+  by(simp add: t_push_def t_pop_def)
+
+lemma "t_pop n l + phi (pop n l) - phi l = 0"
+  by(simp add: t_push_def t_pop_def)
+
+(*\<Longrightarrow> Mit 2 \<in> O(1) und 0 \<in> O(1): push und pop haben eine armortisiert konstante Laufzeit.*)
+
+(*<*)
+end
+(*>*)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/msg-5282-25.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,8 @@
+Hallo Peter,
+
+anbei meine Lsung zur Hausaufgabe 13.
+
+
+Viele Gre,
+
+Simon
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/s.griebel@tum.de_17/msg-5282-26.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,17 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Hallo Peter,</p>
+<p>anbei meine Lsung zur Hausaufgabe 13.</p>
+<p><br>
+</p>
+<p>Viele Gre,</p>
+<p>Simon<br>
+</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+sabine.rieder@tum.de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/hw13tmpl.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,68 @@
+(** Score: 5/5
+*)
+(*<*)
+theory hw13tmpl
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+text \<open>Use the potential method to show that
+the amortized complexity of \<open>push\<close> and \<open>pop\<close> is constant.
+
+Provide complete proofs in Isabelle!
+
+Original text here was:
+\emph{
+If you need any properties of the auxiliary functions \<open>length\<close>, \<open>drop\<close> and \<open>min\<close>,
+you should state them but you do not need to prove them.}\<close>
+
+fun \<Phi>:: "'a list \<Rightarrow> nat" where
+  "\<Phi> ks = length ks"
+
+lemma "\<Phi> [] = 0" by auto
+lemma "\<Phi> l \<ge> 0" by auto
+
+lemma "t_push x ls + \<Phi> (push x ls) - \<Phi> ls = 2"
+proof -
+  have "t_push x ls + \<Phi> (push x ls) - \<Phi> ls = 1 + \<Phi> (push x ls) - \<Phi> ls" by (auto simp add: t_push_def)
+  also have "... = 1 + (length ls +1) - (length ls)" by simp
+  also have "... = 1+1" by auto
+  finally show ?thesis by auto
+qed
+(*by (auto simp add: t_push_def)*)
+
+lemma "t_pop x ls + \<Phi> (pop x ls) - \<Phi> ls = 0"
+proof -
+  have "t_pop x ls + \<Phi> (pop x ls) - \<Phi> ls = min x (length ls) + \<Phi> (pop x ls) - \<Phi> ls" by (auto simp add: t_pop_def)
+  also have "... = min x (length ls) + (length ls - min x (length ls)) - (length ls)" by simp (*lemma on (length (drop n ls)) needed*)
+  finally show ?thesis by auto
+qed
+(*by(auto simp add: t_pop_def)*)
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/msg-5282-23.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,8 @@
+Dear Peter,
+
+Please find homework 13 arrached.
+
+
+Best regards,
+
+Sabine Rieder
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/sabine.rieder@tum.de_16/msg-5282-24.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,17 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear Peter,</p>
+<p>Please find homework 13 arrached.</p>
+<p><br>
+</p>
+<p>Best regards,</p>
+<p>Sabine Rieder<br>
+</p>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/HW13.thy	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,54 @@
+(** Score: 5/5
+*)
+(*<*)
+theory HW13
+imports Main
+begin
+(*>*)
+
+text \<open>\Homework{Amortized Complexity}{13.07.2018}
+
+  This is an old exam question, which we have converted to a homework to
+  be done with Isabelle!
+\<close>
+
+text \<open>A ``stack with multipop'' is a list with the following two interface functions:\<close>
+
+fun push :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"push x xs = x # xs"
+
+fun pop :: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
+"pop n xs = drop n xs"
+
+
+text \<open>You may assume\<close>
+
+definition t_push :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_push x xs = 1"
+
+definition t_pop :: "nat \<Rightarrow> 'a list \<Rightarrow> nat" where
+"t_pop n xs = min n (length xs)"
+
+definition phi :: "'a list \<Rightarrow> nat" where
+"phi as = length(as)" (*number of elements in the list*)
+
+lemma phi_init: "phi [] = 0"
+  by(simp add: phi_def )
+
+
+lemma a_push: "(t_push x xs) + phi(push x xs) - (phi xs) = 2"
+  apply (induction  xs rule:push.induct)
+apply (simp_all add: phi_def t_push_def)
+  done
+
+lemma a_pop: "(t_pop x xs) + phi(pop x xs) - (phi xs) = 0"
+  apply (induction  xs rule:push.induct)
+apply (simp_all add: phi_def t_pop_def)
+done
+
+
+(*<*)
+end
+(*>*)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/SENTMAIL	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,1 @@
+smith.nickh@gmail.com
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/msg-5282-27.txt	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,5 @@
+Attached
+
+-- 
+Nicholas Smith
+(310) 291-0777
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/hw13/smith.nickh@gmail.com_18/msg-5282-28.html	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,2 @@
+<div dir="ltr">Attached<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Nicholas Smith<br>(310) 291-0777</div>
+</div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SS18/Exercises/hwsubm/proj/Project.mbox	Mon Aug 20 11:01:37 2018 +0200
@@ -0,0 +1,7037 @@
+From alexejrotar@gmail.com Thu Jul 12 13:23:10 2018
+Return-Path: <alexejrotar@gmail.com>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ YAkqI4s5R1tLDwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 13:23:10 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id AA0CA1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 13:23:10 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 3986B1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 13:23:09
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ A43B01C04EA; Thu, 12 Jul 2018 13:23:10 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id A0EA71C0503; Thu, 12 Jul 2018 13:23:10 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 7A6061C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:23:10 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 6F4D31C0393
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:23:10 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 6DDEB1C03C7; Thu, 12 Jul 2018 13:23:10 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.1 required=7.0 tests=AWL,BAYES_20,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 1ABB51C03C8
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:23:08 +0200 (CEST)
+Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com
+ [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
+ (128/128 bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id ED7691C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:23:07 +0200 (CEST)
+Received: by mail-wr1-f53.google.com with SMTP id r16-v6so21320615wrt.11
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 04:23:07 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
+ s=20161025; h=message-id:subject:from:to:date:mime-version;
+ bh=AjWkP2+eoOyq9nSR2eJ0gmvDlYtljcgZDFDKLZYoyWs=;
+ b=qgmUtEr3jnz2jdlSI6XNPxNLq1RyGT+ZerYgudXnlrrRQonWXLvkHhDVg1sbw5AKcE
+ Kf0DSzHGQpsKiBFwnvbxkTfJ9f//x/zG22/nu3ZJJxi1/hddTcfhNAVBp22s/dMhhRfv
+ DblLMOHiJs9lhrx+0htnUmiC0i5g14Dj+bLXUwUgHsaCMJPXWklXv0D0jBpbotOCtnAM
+ mNt2MWiYY+NLOEMN09Zwu/9hAPx2CwlEN89ybGKcUsjH2xhLZYDZuPoVPICc8vQcvh+G
+ zRDvcOE4cbtWED+v+X5J3zcy16clrqaCqJer5K3Xwj7bCmjlwdCo5ouEbcGbcIM293/6 N8Fw==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-gm-message-state:message-id:subject:from:to:date:mime-version;
+ bh=AjWkP2+eoOyq9nSR2eJ0gmvDlYtljcgZDFDKLZYoyWs=;
+ b=MPGi0Ws3bbAjiNIOfDS4cDDULv2jWP38q8acC1Ioh8JIutWU7vsJlJWD9PPT04XHqq
+ wGJ6Z+4GWJ/+mT1jpNinSGJ/OCQPN9ST+QYZXy8WxmW+huBj9XCiU9OoxFBbd8aB2XhN
+ Jhw8aNFgZDZVeCbaJfstnd6/10TNaeeae23POTBPP0s8PCHK/bv9z6h6EOV9jDlDlkj+
+ zDt8Pn7inGIzu2/8A4sUYTxkocEE5JQxxkA6n+9Ted8fOMnzX5WzLTbd7iXwkzOKgz6h
+ BbknpjuayFtltHz0X/SW7AaLXHqVCv+h0u5aOoS+BoJzGj5lr+DvzHrkqs9kDotGgouf yeBw==
+X-Gm-Message-State:
+ AOUpUlFAFhj6juEfFSMBRRitjllJpzNRplb6AMHD/zliEoLIQ51ilO1F
+ GAG7u5E41PSBZRRYR1CT7OhpVCAp
+X-Google-Smtp-Source:
+ AAOMgpc7KESkMsLnX0wmiRZroup91MmGEVtMUQyStirAGk2MkixTaf62NIV2ptCoDKjDPof4mbhlrA==
+X-Received: by 2002:a5d:4e49:: with SMTP id
+ r9-v6mr1359642wrt.27.1531394587467; Thu, 12 Jul 2018 04:23:07 -0700 (PDT)
+Received: from localhost.localdomain (client-8-72.eduroam.oxuni.org.uk.
+ [192.76.8.72]) by smtp.googlemail.com with ESMTPSA id
+ 73-v6sm6905690wmu.37.2018.07.12.04.23.06 for <lammich@in.tum.de>
+ (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12
+ Jul 2018 04:23:06 -0700 (PDT)
+Message-ID: <1531394586.1639.2.camel@gmail.com>
+Subject: [FDS] Project
+From: Alexej Rotar <alexejrotar@gmail.com>
+To: lammich@in.tum.de
+Date: Thu, 12 Jul 2018 13:23:06 +0200
+Content-Type: multipart/mixed; boundary="=-ujwVPJ5e1lIfaVYevycN"
+X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) 
+Mime-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--=-ujwVPJ5e1lIfaVYevycN
+Content-Type: text/plain
+Content-Transfer-Encoding: 8bit
+
+
+
+--=-ujwVPJ5e1lIfaVYevycN
+Content-Disposition: attachment; filename="ctl.thy"
+Content-Type: text/plain; name="ctl.thy"; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+theory ctl
+  imports Main
+begin
+
+text \<open>Remark
+
+Before I start, I want to make a remark on the proofs presented here. Most of them split on the syntax of CTL, which is quite large in the formalization I present here. Most of the time, however, the proofs look quite similar for all cases. Therefore, I am convinced that one could prove the facts in a much more elegant way. Unfortunately, despite all efforts, I have not been able to find the elegant proofs. So please apologize the ugly presentation. In most cases, it will suffice to look at only few cases and skip the rest.\<close>
+
+text \<open>Syntax of CTL
+
+In this document, I formalize the theory of the Computation Tree Logic (CTL). In fact, I will only consider the fragment of CTL which has no next-operator, and the until-operator is restricted to the future-operator. The interesting facts that I will prove here, are the Substitution Theorem and the correctness of the transformation to Negation Normal Form (NNF). For the latter, it is required to introduce the duals of all operators. That is, if we allow conjunctions, we also need disjunction; if the have future, we also need globally; if we have universality, we also need existence. The above considerations result in the following syntax:\<close>
+
+datatype ctl = 
+  AP nat | 
+  Not "ctl" | 
+  And "ctl" "ctl" | 
+  Or "ctl" "ctl" | 
+  AllG "ctl" | 
+  AllF "ctl" |
+  ExF "ctl" |
+  ExG "ctl"
+
+text \<open>As with other logics, the notion of subformulas is useful.\<close>
+
+fun sub :: "ctl \<Rightarrow> ctl \<Rightarrow> bool"
+where
+  "sub phi psi \<longleftrightarrow> phi = psi \<or> (case psi of
+    (AP a) \<Rightarrow> False |
+    (Not xi) \<Rightarrow> sub phi xi |
+    (And xi zeta) \<Rightarrow> sub phi xi \<or> sub phi zeta |
+    (Or xi zeta) \<Rightarrow> sub phi xi \<or> sub phi zeta |
+    (AllG xi) \<Rightarrow> sub phi xi |
+    (AllF xi) \<Rightarrow> sub phi xi |
+    (ExF xi) \<Rightarrow> sub phi xi |
+    (ExG xi) \<Rightarrow> sub phi xi)"
+
+text \<open>Another useful notion is the length of a formula.\<close>
+
+fun len :: "ctl \<Rightarrow> nat"
+where
+  "len (AP a) = 1" |
+  "len (Not phi) = Suc (len phi)" |
+  "len (And phi psi) = Suc (len phi + len psi)" |
+  "len (Or phi psi) = Suc (len phi + len psi)" |
+  "len (AllG phi) = Suc (len phi)" |
+  "len (AllF phi) = Suc (len phi)" |
+  "len (ExF phi) = Suc (len phi)" |
+  "len (ExG phi) = Suc (len phi)"
+
+text \<open>Now, we can already state some basic results about the relation between the lengths of a formula and its subformulas. The following two lemmas will be useful when applying an induction over the length of a formula.\<close>
+
+lemma sub_mono:
+  assumes "sub phi psi"
+  shows "len phi \<le> len psi"
+using assms
+proof (induction phi psi rule: sub.induct)
+  case (1 phi psi)
+  then show ?case
+  proof (cases psi)
+    case (AP a)
+    then show ?thesis using 1 by simp
+  next
+    case (Not xi)
+    then have "phi = psi \<or> sub phi xi" using 1 by simp 
+    then show ?thesis using 
+      \<open>psi = Not xi \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close> Not by auto
+  next
+    case (And xi zeta)
+    then have "phi = psi \<or> sub phi xi \<or> sub phi zeta" using 1 by simp
+    then show ?thesis using
+      \<open>psi = And xi zeta \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close>
+      \<open>psi = And xi zeta \<Longrightarrow> sub phi zeta \<Longrightarrow> len phi \<le> len zeta\<close> And by auto
+  next
+    case (Or xi zeta)
+    then have "phi = psi \<or> sub phi xi \<or> sub phi zeta" using 1 by simp
+    then show ?thesis using
+      \<open>psi = Or xi zeta \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close>
+      \<open>psi = Or xi zeta \<Longrightarrow> sub phi zeta \<Longrightarrow> len phi \<le> len zeta\<close> Or by auto
+  next
+    case (AllG xi)
+    then have "phi = psi \<or> sub phi xi" using 1 by simp 
+    then show ?thesis using 
+      \<open>psi = AllG xi \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close> AllG by auto
+  next
+    case (AllF xi)
+    then have "phi = psi \<or> sub phi xi" using 1 by simp 
+    then show ?thesis using 
+      \<open>psi = AllF xi \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close> AllF by auto
+ next
+    case (ExG xi)
+    then have "phi = psi \<or> sub phi xi" using 1 by simp 
+    then show ?thesis using 
+      \<open>psi = ExG xi \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close> ExG by auto
+  next
+    case (ExF xi)
+    then have "phi = psi \<or> sub phi xi" using 1 by simp 
+    then show ?thesis using 
+      \<open>psi = ExF xi \<Longrightarrow> sub phi xi \<Longrightarrow> len phi \<le> len xi\<close> ExF by auto
+  qed
+qed
+
+lemma sub_shorter:
+  assumes "sub phi psi" "phi \<noteq> psi"
+  shows "len phi < len psi"
+proof (rule ccontr)
+  assume "\<not>len phi < len psi"
+  then have "len phi = len psi" using assms sub_mono by fastforce
+  then show False using assms sub_mono by (cases psi) fastforce+
+qed
+
+text \<open>Semantics of CTL
+
+Now that we have defined the syntax of CTL, it is time to talk about their semantics. For this, we first need to define the structures that they are interpreted over. Those are called Labelled Transition Systems (LTS). For convenience, we introduce type synonyms for successors and labels. Informally, a successor relation specifies, whether one state can reach another in one step. The labelling specifies, whether a state satisfies a certain atomic proposition (AP). Both, states and APs are natural numbers in this document.\<close>
+
+type_synonym successors = "nat \<Rightarrow> nat \<Rightarrow> bool"
+type_synonym labels = "nat \<Rightarrow> nat \<Rightarrow> bool"
+
+text \<open>The above successor relation only specifies immediate successors. However, for the semantics we rather need its transitive closure; i.e. we need to know, whether one state can reach another within arbitrarily many steps. The following inductive definition formalizes this idea.\<close>
+
+inductive reachable :: "nat \<Rightarrow> nat \<Rightarrow> successors \<Rightarrow> bool"
+where
+  self: "reachable s s _" |
+  succ: "reachable s t post \<and> post t t' \<Longrightarrow> reachable s t' post"
+
+text \<open>Apart from reachability, we sometimes have to reason about paths through the system. We formalize a path as a map from the natural numbers to states. Such a map is a valid path, if it respects a given successor relation. Concretely:\<close>
+
+definition path :: "nat \<Rightarrow> successors \<Rightarrow> (nat \<Rightarrow> nat) \<Rightarrow> bool"
+where
+  "path s post pi \<longleftrightarrow> pi 0 = s \<and> (\<forall>i. post (pi i) (pi (Suc i)))"
+
+text \<open>Now, we can finally define, what it means for an LTS to model a formula.\<close>
+
+fun models :: "nat \<Rightarrow> successors \<Rightarrow> labels \<Rightarrow> ctl \<Rightarrow> bool"
+where
+  "models s _ L (AP a) \<longleftrightarrow> L s a" |
+  "models s post L (Not phi) \<longleftrightarrow> \<not>models s post L phi" |
+  "models s post L (And phi psi) \<longleftrightarrow> models s post L phi \<and> models s post L psi" |
+  "models s post L (Or phi psi) \<longleftrightarrow> models s post L phi \<or> models s post L psi" |
+  "models s post L (AllF phi) \<longleftrightarrow> (\<forall>pi. path s post pi \<longrightarrow> (\<exists>i. models (pi i) post L phi))" |
+  "models s post L (AllG phi) \<longleftrightarrow> (\<forall>t. reachable s t post \<longrightarrow> models t post L phi)" |
+  "models s post L (ExF phi) \<longleftrightarrow> (\<exists>t. reachable s t post \<and> models t post L phi)" |
+  "models s post L (ExG phi) \<longleftrightarrow> (\<exists>pi. path s post pi \<and> (\<forall>i. models (pi i) post L phi))"
+
+text \<open>Observe the similarities between the semantics of AllG and ExF, as well as between AllF and ExG. The former two only need to reason about the reachability of states, whereas the latter two make statements about concrete paths of the system. The similarity of the pairs is reflected by the fact that the respective pairs are duals of each other. This will be important for the transformation into the NNF.
+
+Next, we define the notion of equivalence for CTL formulas and prove that it is indeed an equivalence relation.\<close>
+
+definition eq :: "ctl \<Rightarrow> ctl \<Rightarrow> bool"
+where
+  "eq phi psi \<longleftrightarrow> (\<forall>s post L. models s post L phi \<longleftrightarrow> models s post L psi)"
+
+lemma eq_relation[simp]:
+  shows "eq phi phi"
+    and "eq phi psi \<Longrightarrow> eq psi phi"
+    and "eq phi psi \<Longrightarrow> eq psi xi \<Longrightarrow> eq phi xi"
+  by (auto simp: eq_def)
+
+text \<open>Substitution Lemma
+
+The Substitution Lemma is useful for logics in general. It states that a formula can be replaced by an equivalent one in a larger formula. We define the substitution as follows:\<close>
+
+fun substitute :: "ctl \<Rightarrow> ctl \<Rightarrow> ctl \<Rightarrow> ctl"
+where
+  "substitute xi psi phi = (if phi = psi then xi else
+    (case phi of
+      AP a \<Rightarrow> AP a |
+      Not zeta \<Rightarrow> Not (substitute xi psi zeta) |
+      And zeta eta \<Rightarrow> And (substitute xi psi zeta) (substitute xi psi eta) |
+      Or zeta eta \<Rightarrow> Or (substitute xi psi zeta) (substitute xi psi eta) |
+      AllF zeta \<Rightarrow> AllF (substitute xi psi zeta) |
+      AllG zeta \<Rightarrow> AllG (substitute xi psi zeta) |
+      ExF zeta \<Rightarrow> ExF (substitute xi psi zeta) |
+      ExG zeta \<Rightarrow> ExG (substitute xi psi zeta)
+    )
+  )"
+
+text \<open>First, we prove some simple lemmas which shall demonstrate that our intuition about substitution is fulfilled by the \<open>substitute\<close> function.\<close>
+
+lemma
+  assumes "phi' = substitute xi psi phi" "sub psi phi"
+  shows "sub xi phi'"
+  using assms
+  by (induction phi arbitrary: psi phi') fastforce+
+
+lemma substitute_neutral:
+  assumes "\<not>sub psi phi"
+  shows "substitute xi psi phi = phi"
+  using assms
+  by (induction phi arbitrary: psi) auto
+
+text \<open>Now, we prove the Substitution Lemma. For convenience, we distinguish whether the formula to be substituted is a subformula or not.\<close>
+
+lemma subs_is_sub:
+ assumes "eq xi psi" "sub psi phi"
+ shows "eq (substitute xi psi phi) phi"
+ using assms
+proof (induction phi rule: measure_induct_rule[where ?f="len"])
+  case (less phi)
+  then show ?case
+  proof (cases "phi = psi")
+    case True
+    then have "substitute xi psi phi = xi" by simp
+    then show ?thesis using \<open>eq xi psi\<close> True by argo
+  next
+    case False
+    then show ?thesis
+    proof (cases phi)
+      case (AP a)
+      then show ?thesis using False less(1)[OF _ \<open>eq xi psi\<close> \<open>sub psi phi\<close>] by force
+    next
+      case (Not zeta)
+      from Not sub_shorter have "len zeta < len phi" by force
+      then have "eq (substitute xi psi zeta) zeta" using substitute_neutral less
+        by (metis eq_relation(1))
+      moreover have "substitute xi psi phi = Not (substitute xi psi zeta)"
+        using False Not by simp
+      ultimately show ?thesis by (simp add: Not eq_def)
+    next
+      case (And zeta eta)
+      from And sub_shorter have "len zeta < len phi" "len eta < len phi" by force+
+      then have
+        "eq (substitute xi psi zeta) zeta" "eq (substitute xi psi eta) eta"
+        using less substitute_neutral by (metis eq_relation(1))+
+      moreover have
+        "substitute xi psi phi = And (substitute xi psi zeta) (substitute xi psi eta)"
+        using False And by simp
+      ultimately show ?thesis by (simp add: And eq_def)
+    next
+      case (Or zeta eta)
+      from Or sub_shorter have "len zeta < len phi" "len eta < len phi" by force+
+      then have
+        "eq (substitute xi psi zeta) zeta" "eq (substitute xi psi eta) eta"
+        using less substitute_neutral by (metis eq_relation(1))+
+      moreover have
+        "substitute xi psi phi = Or (substitute xi psi zeta) (substitute xi psi eta)"
+        using False Or by simp
+      ultimately show ?thesis by (simp add: Or eq_def)
+    next
+      case (AllG zeta)
+      from AllG sub_shorter have "len zeta < len phi" by force
+      then have "eq (substitute xi psi zeta) zeta" using substitute_neutral less
+        by (metis eq_relation(1))
+      moreover have "substitute xi psi phi = AllG (substitute xi psi zeta)"
+        using False AllG by simp
+      ultimately show ?thesis by (simp add: AllG eq_def)
+    next
+      case (AllF zeta)
+      from AllF sub_shorter have "len zeta < len phi" by force
+      then have "eq (substitute xi psi zeta) zeta" using substitute_neutral less
+        by (metis eq_relation(1))
+      moreover have "substitute xi psi phi = AllF (substitute xi psi zeta)"
+        using False AllF by simp
+      ultimately show ?thesis by (simp add: AllF eq_def)
+    next
+      case (ExG zeta)
+      from ExG sub_shorter have "len zeta < len phi" by force
+      then have "eq (substitute xi psi zeta) zeta" using substitute_neutral less
+        by (metis eq_relation(1))
+      moreover have "substitute xi psi phi = ExG (substitute xi psi zeta)"
+        using False ExG by simp
+      ultimately show ?thesis by (simp add: ExG eq_def)
+    next
+      case (ExF zeta)
+      from ExF sub_shorter have "len zeta < len phi" by force
+      then have "eq (substitute xi psi zeta) zeta" using substitute_neutral less
+        by (metis eq_relation(1))
+      moreover have "substitute xi psi phi = ExF (substitute xi psi zeta)"
+        using False ExF by simp
+      ultimately show ?thesis by (simp add: ExF eq_def)
+    qed
+  qed
+qed
+
+lemma subs_not_sub:
+ assumes "\<not>sub psi phi"
+ shows "eq (substitute xi psi phi) phi"
+ using assms substitute_neutral by simp 
+
+text \<open>From the above lemmas, the Substitution Lemma follows immediately.\<close>
+
+lemma substitution_lemma:
+  assumes "eq xi psi"
+  shows "eq (substitute xi psi phi) phi"
+  using subs_is_sub subs_not_sub assms by (cases "sub psi phi")
+
+text \<open>Negation Normal Form
+
+Sometimes, it is more convenient to reason about the formulas in the NNF. In the following, we define what the NNF is, implement a function that transforms a general CTL formula into NNF, and prove its correctness. Informally, a formula is in NNF, if negations only occur in front of APs. Formally:\<close>
+
+fun nnf :: "ctl \<Rightarrow> bool"
+where
+  "nnf (AP a) \<longleftrightarrow> True" |
+  "nnf (Not phi) \<longleftrightarrow> (case phi of (AP a) \<Rightarrow> True | _ \<Rightarrow> False)" |
+  "nnf (And phi psi) \<longleftrightarrow> nnf phi \<and> nnf psi" |
+  "nnf (Or phi psi) \<longleftrightarrow> nnf phi \<and> nnf psi" |
+  "nnf (AllG phi) \<longleftrightarrow> nnf phi" |
+  "nnf (AllF phi) \<longleftrightarrow> nnf phi" |
+  "nnf (ExF phi) \<longleftrightarrow> nnf phi" |
+  "nnf (ExG phi) \<longleftrightarrow> nnf phi"
+
+text \<open>In order to transform a formula into NNF, we have to propagate the negations down in the syntactic tree. For this, we use the respective dual operators and the double negation elimination.\<close>
+
+fun make_nnf :: "ctl \<Rightarrow> ctl"
+where
+  "make_nnf (AP a) = AP a" |
+  "make_nnf (Not phi) = (
+    case phi of
+      (AP a) \<Rightarrow> Not (AP a) |
+      (Not psi) \<Rightarrow> (make_nnf psi) |
+      (And psi xi) \<Rightarrow> Or (make_nnf (Not psi)) (make_nnf (Not xi)) |
+      (Or psi xi) \<Rightarrow> And (make_nnf (Not psi)) (make_nnf (Not xi)) |
+      (AllF psi) \<Rightarrow> ExG (make_nnf (Not psi)) |
+      (AllG psi) \<Rightarrow> ExF (make_nnf (Not psi)) |
+      (ExF psi) \<Rightarrow> AllG (make_nnf (Not psi)) |
+      (ExG psi) \<Rightarrow> AllF (make_nnf (Not psi)))" |
+  "make_nnf (And phi psi) = And (make_nnf phi) (make_nnf psi)" |
+  "make_nnf (Or phi psi) = Or (make_nnf phi) (make_nnf psi)" |
+  "make_nnf (AllG phi) = AllG (make_nnf phi)" |
+  "make_nnf (AllF phi) = AllF (make_nnf phi)" |
+  "make_nnf (ExG phi) = ExG (make_nnf phi)" |
+  "make_nnf (ExF phi) = ExF (make_nnf phi)"
+
+text \<open>First, we have to prove that the created formula is indeed in NNF.\<close>
+
+lemma make_nnf_correct: "nnf (make_nnf phi)"
+proof (induction phi rule: measure_induct_rule[where ?f=len])
+  case (less phi)
+  then show ?case
+  proof (cases phi)
+    case (AP a)
+    then show ?thesis by simp
+  next
+    case (Not psi)
+    then show ?thesis
+    proof (cases psi)
+      case (AP a)
+      then show ?thesis using \<open>phi = Not psi\<close> by simp
+    next
+      case (Not xi)
+      then have "len xi < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf xi)" using less by auto
+      moreover from \<open>psi = Not xi\<close> \<open>phi = Not psi\<close> have "make_nnf phi = make_nnf xi"  by simp 
+      ultimately show ?thesis by auto
+    next
+      case (And xi zeta)
+      then have "len (Not xi) < len phi" "len (Not zeta) < len phi"
+        using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" "nnf (make_nnf (Not zeta))" using less by blast+
+      moreover from \<open>phi = Not psi\<close> \<open>psi = And xi zeta\<close>
+        have "make_nnf phi = Or (make_nnf (Not xi)) (make_nnf (Not zeta))" by simp
+      ultimately show ?thesis by auto
+    next
+      case (Or xi zeta)
+      then have "len (Not xi) < len phi" "len (Not zeta) < len phi"
+        using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" "nnf (make_nnf (Not zeta))" using less by blast+
+      moreover from \<open>phi = Not psi\<close> \<open>psi = Or xi zeta\<close>
+        have "make_nnf phi = And (make_nnf (Not xi)) (make_nnf (Not zeta))" by simp
+      ultimately show ?thesis by auto
+    next
+      case (AllG xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = AllG xi\<close> 
+        have "make_nnf phi = ExF (make_nnf (Not xi))" by simp
+      ultimately show ?thesis by auto
+    next
+      case (AllF xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = AllF xi\<close> 
+        have "make_nnf phi = ExG (make_nnf (Not xi))" by simp
+      ultimately show ?thesis by auto
+    next
+      case (ExG xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = ExG xi\<close> 
+        have "make_nnf phi = AllF (make_nnf (Not xi))" by simp
+      ultimately show ?thesis by auto
+    next
+      case (ExF xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "nnf (make_nnf (Not xi))" using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = ExF xi\<close> 
+        have "make_nnf phi = AllG (make_nnf (Not xi))" by simp
+      ultimately show ?thesis by auto
+    qed
+  next
+    case (And psi xi)
+    then have "len psi < len phi" by auto
+    then have nnfpsi: "nnf (make_nnf psi)" using less by auto
+    from \<open>phi = And psi xi\<close> have "len xi < len phi" by auto
+    then have nnfxi: "nnf (make_nnf xi)" using less by auto
+    from nnfpsi nnfxi \<open>phi = And psi xi\<close> show ?thesis by auto
+  next
+    case (Or psi xi)
+    then have "len psi < len phi" by auto
+    then have nnfpsi: "nnf (make_nnf psi)" using less by auto
+    from \<open>phi = Or psi xi\<close> have "len xi < len phi" by auto
+    then have nnfxi: "nnf (make_nnf xi)" using less by auto
+    from nnfpsi nnfxi \<open>phi = Or psi xi\<close> show ?thesis by auto
+  next
+    case (AllG psi)
+    then have "len psi < len phi" by auto
+    then have "nnf (make_nnf psi)" using less by auto
+    then show ?thesis using \<open>phi = AllG psi\<close> by auto
+  next
+    case (AllF psi)
+    then have "len psi < len phi" by auto
+    then have "nnf (make_nnf psi)" using less by auto
+    then show ?thesis using \<open>phi = AllF psi\<close> by auto
+  next
+    case (ExG psi)
+    then have "len psi < len phi" by auto
+    then have "nnf (make_nnf psi)" using less by auto
+    then show ?thesis using \<open>phi = ExG psi\<close> by auto
+  next
+    case (ExF psi)
+    then have "len psi < len phi" by auto
+    then have "nnf (make_nnf psi)" using less by auto
+    then show ?thesis using \<open>phi = ExF psi\<close> by auto
+  qed
+qed
+
+text \<open>Now, we prove that the formula in NNF is equivalent to the original one.\<close>
+
+lemma nnf_eq_orig: "eq phi (make_nnf phi)"
+proof (induction phi rule: measure_induct_rule[where ?f=len])
+  case (less phi)
+  then show ?case
+  proof (cases phi)
+    case (AP a)
+    then show ?thesis by simp
+  next
+    case (Not psi)
+    then show ?thesis
+    proof (cases psi)
+      case (AP a)
+      then show ?thesis using \<open>phi = Not psi\<close> by simp
+    next
+      case (Not xi)
+      then have "len xi < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "eq xi (make_nnf xi)"
+        using less  by blast
+      then show ?thesis using \<open>phi = Not psi\<close> \<open>psi = Not xi\<close> by (simp add: eq_def)
+    next
+      case (And xi zeta)
+      then have "len (Not xi) < len phi" "len (Not zeta) < len phi"
+        using \<open>phi = Not psi\<close> by auto
+      then have
+        "eq (Not xi) (make_nnf (Not xi))"
+        "eq (Not zeta) (make_nnf (Not zeta))"
+        using less by blast+
+      moreover from \<open>phi = Not psi\<close> \<open>psi = And xi zeta\<close>
+        have "make_nnf phi = Or (make_nnf (Not xi)) (make_nnf (Not zeta))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = And xi zeta\<close> by (simp add: eq_def)
+    next
+      case (Or xi zeta)
+      then have "len (Not xi) < len phi" "len (Not zeta) < len phi"
+        using \<open>phi = Not psi\<close> by auto
+      then have
+        "eq (Not xi) (make_nnf (Not xi))"
+        "eq (Not zeta) (make_nnf (Not zeta))"
+        using less by blast+
+      moreover from \<open>phi = Not psi\<close> \<open>psi = Or xi zeta\<close>
+        have "make_nnf phi = And (make_nnf (Not xi)) (make_nnf (Not zeta))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = Or xi zeta\<close> by (simp add: eq_def)
+    next
+      case (AllG xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "eq (Not xi) (make_nnf (Not xi))"
+        using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = AllG xi\<close> 
+        have "make_nnf phi = ExF (make_nnf (Not xi))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = AllG xi\<close> by (simp add: eq_def)
+    next
+      case (AllF xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "eq (Not xi) (make_nnf (Not xi))"
+        using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = AllF xi\<close> 
+        have "make_nnf phi = ExG (make_nnf (Not xi))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = AllF xi\<close> by (simp add: eq_def)
+    next
+      case (ExG xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "eq (Not xi) (make_nnf (Not xi))"
+        using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = ExG xi\<close> 
+        have "make_nnf phi = AllF (make_nnf (Not xi))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = ExG xi\<close> by (simp add: eq_def)
+    next
+      case (ExF xi)
+      then have "len (Not xi) < len phi" using \<open>phi = Not psi\<close> by auto
+      then have "eq (Not xi) (make_nnf (Not xi))"
+        using less by blast
+      moreover from \<open>phi = Not psi\<close> \<open>psi = ExF xi\<close> 
+        have "make_nnf phi = AllG (make_nnf (Not xi))" by simp
+      ultimately show ?thesis using \<open>phi = Not psi\<close> \<open>psi = ExF xi\<close> by (simp add: eq_def)
+    qed
+  next
+    case (And psi xi)
+    then have "len psi < len phi" "len xi < len phi" by auto
+    then have
+      "eq psi (make_nnf psi)"
+      "eq xi (make_nnf xi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = And psi xi\<close> by (simp add: eq_def)
+  next
+    case (Or psi xi)
+    then have "len psi < len phi" "len xi < len phi" by auto
+    then have
+      "eq psi (make_nnf psi)"
+      "eq xi (make_nnf xi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = Or psi xi\<close> by (simp add: eq_def)
+  next
+    case (AllG psi)
+    then have "len psi < len phi" by auto
+    then have "eq psi (make_nnf psi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = AllG psi\<close> by (simp add: eq_def)
+  next
+    case (AllF psi)
+    then have "len psi < len phi" by auto
+    then have "eq psi (make_nnf psi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = AllF psi\<close> by (simp add: eq_def)
+  next
+    case (ExG psi)
+    then have "len psi < len phi" by auto
+    then have "eq psi (make_nnf psi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = ExG psi\<close> by (simp add: eq_def)
+  next
+    case (ExF psi)
+    then have "len psi < len phi" by auto
+    then have "eq psi (make_nnf psi)"
+      using less by blast+
+    then show ?thesis using \<open>phi = ExF psi\<close> by (simp add: eq_def)
+  qed
+qed
+
+text \<open>Future Work
+
+This document can be extended in various ways. Firstly, one might extend it to capture all constructs of CTL (i.e. the U and the X operators) or even CTL*, which allows to nest path and state formulas arbitrarily. Secondly, one could prove some general equalities. Thirdly and most interestingly, one might formalize the CTL model checking algorithm and prove its correctness. This requires a formalization of minimal and maximal fixpoints.\<close>
+
+end
+--=-ujwVPJ5e1lIfaVYevycN--
+
+
+From m.kirchmeier@tum.de Thu Jul 12 13:44:59 2018
+Return-Path: <m.kirchmeier@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ AaDuNjM/R1vIVwAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 13:44:59 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 345851C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 13:44:59 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id B5F6F1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 13:44:57
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 301921C03A1; Thu, 12 Jul 2018 13:44:59 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 2DD421C04EC; Thu, 12 Jul 2018 13:44:59 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 479531C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:44:53 +0200
+ (CEST)
+Received: from vmrbg98.informatik.tu-muenchen.de
+ (vmrbg98.informatik.tu-muenchen.de [131.159.0.123]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 3D2871C03A1
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 13:44:53 +0200 (CEST)
+Received: from webmail.in.tum.de (localhost [IPv6:::1]) by
+ vmrbg98.informatik.tu-muenchen.de (Postfix) with ESMTP id 2FB8840189 for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 13:44:53 +0200 (CEST)
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="=_9e0110db7222e7245ec3c1f7e25e8c06"
+Date: Thu, 12 Jul 2018 13:44:53 +0200
+From: Maximilian Kirchmeier <m.kirchmeier@tum.de>
+To: Peter Lammich <lammich@in.tum.de>
+Subject: [FDS] Project
+Message-ID: <5c76af08a29024dc36f7ec2a53579011@tum.de>
+X-Sender: m.kirchmeier@tum.de
+User-Agent: Roundcube Webmail/1.3.3
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--=_9e0110db7222e7245ec3c1f7e25e8c06
+Content-Type: text/plain; charset=UTF-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+Hallo Peter,
+
+anbei meine Formalisierung von Fibonacci Heaps.
+Für eine amortisierte Komplexitätsanalyse hat's leider nicht mehr 
+gereicht, aber ich denke mal, das ist so schon genug der Formalisierung 
+:D
+
+Viele Grüße
+Max
+--=_9e0110db7222e7245ec3c1f7e25e8c06
+Content-Type: text/plain; name=FibHeap.thy
+Content-Disposition: attachment; filename=FibHeap.thy; size=32423
+Content-Transfer-Encoding: 8bit
+
+theory FibHeap
+imports
+  Complex_Main
+  "HOL-Library.Pattern_Aliases"
+  "HOL-Library.Multiset"
+  "HOL-Data_Structures.Priority_Queue"
+begin
+
+unbundle pattern_aliases
+
+fun fibo :: "nat \<Rightarrow> nat" where
+  "fibo 0 = 0"
+| "fibo (Suc 0) = 1"
+| "fibo (Suc (Suc n)) = fibo n + fibo (Suc n)"
+
+lemma fibo: "n \<ge> 2 \<Longrightarrow> fibo n = fibo (n-2) + fibo (n-1)"
+  by ((induction n ; simp), metis Suc_le_lessD Suc_pred fibo.simps(3))
+
+section \<open>Functionality\<close>
+
+(*
+  In this theory, I've proved that Fibonacci heaps work as priority queues, and keep their special
+  structural property (i.e. \<forall> node n. size n \<le> fibo (degree n + 2)), where size is the number of
+  contained elements in the subtree starting at n and degree is the number of children directly
+  connected to the node.
+
+  I have sadly not gotten to proving any complexity bounds, but given a guarantee for the fibonacci
+  property, a large part of the work for that should be done.
+*)
+
+(*
+  Fibonacci heap is a list of heaps,
+  with a reference to the heap containing min element kept separately.
+  Note that "marked" would be required only for complexity analysis, so it is unused.
+
+  For a good intuitive explanation of how Fibonacci heaps work, see:
+  https://www.cs.princeton.edu/~wayne/teaching/fibonacci-heap.pdf
+*)
+
+datatype 'a fibnode = Node (marked: bool) (val: 'a) (children: "'a fibnode list")
+datatype 'a fib = E | H (min: "'a fibnode") (roots: "'a fibnode list")
+
+(* format in which fibnodes are kept during consolidation (= reconstruction) *)
+type_synonym 'a cons_list = "'a fibnode list"
+
+subsection \<open>Helper Functions\<close>
+
+fun sum :: "'a list \<Rightarrow> ('a \<Rightarrow> 'b::comm_monoid_add) \<Rightarrow> 'b" where
+  "sum [] _ = 0"
+| "sum (x # xs) f = f x + sum xs f"
+
+fun mset_fibnodes :: "'a fibnode list \<Rightarrow> 'a multiset"
+  and mset_fibnode :: "'a fibnode \<Rightarrow> 'a multiset" where
+  "mset_fibnodes [] = {#}"
+| "mset_fibnodes (n # ns) = mset_fibnode n + mset_fibnodes ns"
+| "mset_fibnode (Node _ v c) = add_mset v (mset_fibnodes c)"
+
+fun set_of_fibnodes :: "'a fib \<Rightarrow> 'a fibnode set" where
+  "set_of_fibnodes E = {}"
+| "set_of_fibnodes (H m rs) = Set.insert m (set rs)"
+
+fun size :: "'a fibnode \<Rightarrow> nat"
+  and sizes :: "'a fibnode list \<Rightarrow> nat" where
+  "size (Node m v cs) = 1 + sizes cs"
+| "sizes [] = 0"
+| "sizes (c # cs) = size c + sizes cs"
+
+definition degree :: "'a fibnode \<Rightarrow> nat" where
+  "degree n = length (children n)"
+
+fun distinct_proj :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> bool" where
+  "distinct_proj f l = (card (f `set l) = length l)"
+
+subsection \<open>Main Functions\<close>
+
+definition empty :: "'a fib" where
+  "empty = E"
+  
+fun mset_fib :: "'a fib \<Rightarrow> 'a multiset" where
+  "mset_fib E = {#}"
+| "mset_fib (H m ns) = mset_fibnode m + mset_fibnodes ns"
+
+definition is_empty :: "'a fib \<Rightarrow> bool" where
+  "is_empty h = (h = E)"
+
+fun get_min :: "'a fib \<Rightarrow> 'a" where
+  "get_min (H (Node _ v _) _) = v"
+| "get_min E = undefined"
+
+fun insert_node :: "'a::linorder fibnode \<Rightarrow> 'a fib \<Rightarrow> 'a fib" where
+  "insert_node n E = H n []"
+| "insert_node n (H m rs) = (
+    if val n > val m then
+      H m (n # rs)
+    else
+      H n (m # rs))"
+
+definition insert :: "'a::linorder \<Rightarrow> 'a fib \<Rightarrow> 'a fib" where
+  "insert v h = insert_node (Node False v []) h"
+
+fun link :: "'a::linorder fibnode \<Rightarrow> 'a fibnode \<Rightarrow> 'a fibnode" where
+  "link (Node m1 v1 c1 =: n1) (Node m2 v2 c2 =: n2) = (
+    if v1 < v2 then Node m1 v1 (n2 # c1)
+    else Node m2 v2 (n1 # c2))"
+
+(* merge a new node into a cons-list, linking it with a node of same degree, if already contained *)
+fun cons_merge :: "'a::linorder fibnode \<Rightarrow> 'a cons_list  \<Rightarrow> 'a cons_list" where
+  "cons_merge n [] = [n]"
+| "cons_merge n (n2 # rs) = 
+    (if degree n = degree n2 then cons_merge (link n n2) rs else
+     if degree n < degree n2 then (n # n2 # rs) else n2 # cons_merge n rs)"
+
+fun cons_to_fib_aux :: "'a::linorder cons_list \<Rightarrow> 'a fib \<Rightarrow> 'a fib" where
+  "cons_to_fib_aux [] h = h"
+| "cons_to_fib_aux (n # cs) h = cons_to_fib_aux cs (insert_node n h)"
+
+(* rebuild the fib-heap from a cons-list *)
+definition cons_to_fib :: "'a::linorder cons_list \<Rightarrow> 'a fib" where
+  "cons_to_fib cs = cons_to_fib_aux cs empty"
+
+(* 
+  consolidate a list of fibnodes into a fib that has the fibonacci property and doesn't contain
+  more than one root of each degree
+*)
+definition consolidate :: "'a::linorder fibnode list \<Rightarrow> 'a fib" where
+  "consolidate rs = cons_to_fib (fold cons_merge rs [])"
+
+fun delete_min :: "'a::linorder fib \<Rightarrow> 'a fib" where
+  "delete_min E = E"
+| "delete_min (H (Node m v c) rs) = consolidate (c @ rs)"
+
+fun merge :: "'a::linorder fib \<Rightarrow> 'a fib \<Rightarrow> 'a fib" where
+  "merge E h = h"
+| "merge h E = h"
+| "merge (H m1 rs1) (H m2 rs2) =
+    (if val m1 \<le> val m2
+      then insert_node m2 (H m1 (rs1@rs2))
+      else insert_node m1 (H m2 (rs2@rs1)))"
+
+section \<open>Invariants\<close>
+
+subsection \<open>Functional Invariants\<close>
+
+(* mainly written in this strange form to get a useful induction template *)
+fun valid_fibnode :: "'a::linorder fibnode \<Rightarrow> bool" where
+  "valid_fibnode (Node m v []) = True"
+| "valid_fibnode (Node m v ((Node _ v2 c2 =: n2) # ns)) =
+    (v \<le> v2 \<and> valid_fibnode n2 \<and> valid_fibnode (Node m v ns))"
+
+fun valid_fibnode2 :: "'a::linorder fibnode \<Rightarrow> bool" where
+  "valid_fibnode2 (Node m v c) = (\<forall>n \<in> set c. v \<le> val n \<and> valid_fibnode n)"
+
+fun valid_fib_nodes :: "'a::linorder fib \<Rightarrow> bool" where
+  "valid_fib_nodes E = True"
+| "valid_fib_nodes (H m rs) = (valid_fibnode m \<and> (\<forall>r \<in> set rs. valid_fibnode r))"
+
+(* mainly written in this strange form to get a useful induction template *)
+fun valid_fib_min :: "'a::linorder fib \<Rightarrow> bool" where
+  "valid_fib_min E = True"
+| "valid_fib_min (H _ []) = True"
+| "valid_fib_min (H (Node m1 v1 c1) (Node _ v2 _ # rs)) =
+  (v1 \<le> v2 \<and> valid_fib_min (H (Node m1 v1 c1) rs))"
+
+fun valid_fib_min2 :: "'a::linorder fib \<Rightarrow> bool" where
+  "valid_fib_min2 E = True"
+| "valid_fib_min2 (H (Node m v c) rs) = (\<forall>r \<in> set rs. v \<le> val r)"
+
+fun valid_fib :: "'a::linorder fib \<Rightarrow> bool" where
+  "valid_fib h = (valid_fib_nodes h \<and> valid_fib_min h)"
+
+fun valid_cons_list :: "'a::linorder cons_list \<Rightarrow> bool" where
+  "valid_cons_list [] = True"
+| "valid_cons_list (n # ns) = (valid_fibnode n \<and> valid_cons_list ns)"
+
+definition valid_cons_list2 :: "'a::linorder cons_list \<Rightarrow> bool" where
+  "valid_cons_list2 cs = (\<forall>n \<in> set cs. valid_fibnode n)"
+
+fun valid_fibonacci :: "'a fibnode \<Rightarrow> bool" where
+  "valid_fibonacci (Node m v c) =
+    (size (Node m v c) \<ge> fibo (length c + 2) \<and> (\<forall>n \<in> set c. valid_fibonacci n))"
+
+subsection \<open>Structural Invariants\<close>
+
+(* guarantee that the cons list is sorted by degree during consolidation *)
+fun valid_cons_list_degrees :: "'a cons_list \<Rightarrow> bool" where
+  "valid_cons_list_degrees l = sorted_wrt (op <) (map degree l)"
+
+(* guarantee that fibnodes have the fibonacci property *)
+fun valid_fibnode_fibo :: "'a fibnode \<Rightarrow> bool"
+  and valid_fibnodes_fibo :: "'a fibnode list \<Rightarrow> bool" where
+  "valid_fibnode_fibo (Node m v cs =: n) = (size n \<ge> fibo (degree n + 2) \<and> valid_fibnodes_fibo cs)"
+| "valid_fibnodes_fibo [] = True"
+| "valid_fibnodes_fibo (n # ns) = (valid_fibnode_fibo n \<and> valid_fibnodes_fibo ns)"
+
+fun valid_fib_fibo :: "'a fib \<Rightarrow> bool" where
+  "valid_fib_fibo E = True"
+| "valid_fib_fibo (H m rs) = (valid_fibnode_fibo m \<and> valid_fibnodes_fibo rs)"
+
+fun valid_fib_all :: "'a::linorder fib \<Rightarrow> bool" where
+  "valid_fib_all h = (valid_fib h \<and> valid_fib_fibo h)"
+
+(* not really an invariant, only valid right after consolidate *)
+fun fib_degrees_distinct :: "'a fib \<Rightarrow> bool" where
+  "fib_degrees_distinct E = True"
+| "fib_degrees_distinct (H m rs) = distinct_proj degree (m # rs)"
+
+section \<open>Proofs\<close>
+subsection \<open>General Helper Lemmas\<close>
+
+lemma sets_min:
+  assumes
+    "a \<le> b"
+    "a = Min sa" "finite sa" "sa \<noteq> {}"
+    "b = Min sb" "finite sb" "sb \<noteq> {}"
+  shows "a = Min (sa \<union> sb)" using assms Min.union[of sa sb]
+  by (simp add: min.order_iff)
+
+lemma sets_min_add:
+  assumes
+    "mb = Min sb" "finite sb" "sb \<noteq> {}"
+  shows
+    "Min (sa \<union> sb) = Min (sa \<union> {mb})"
+proof (cases "Min (sa \<union> sb) = mb")
+  case True
+  then show ?thesis using assms
+    by (metis Min.infinite Min.union Min_singleton Un_infinite insert_is_Un insert_not_empty sup_commute)
+next
+  case False
+  then show ?thesis using assms
+    by (metis Min.infinite Min.union Min_singleton Un_infinite finite.insertI insert_not_empty sup_bot.right_neutral sup_commute)
+qed
+
+lemma msets_min_add1:
+  assumes
+    "mb = Min_mset msb" "msb \<noteq> {#}"
+  shows
+    "Min_mset (msa + msb) = Min_mset (msa + {#mb#})"
+  by (simp add: sets_min_add assms(1) assms(2))
+
+lemma msets_min_add2:
+  shows
+    "\<exists>m \<in> set_mset msa. m \<le> mb \<Longrightarrow> Min_mset (msa + {#mb#}) = Min_mset msa"
+  by (auto, metis Min_insert Min_le dual_order.trans equals0D finite_set_mset min.absorb2)
+
+lemma fold_measure:
+  fixes M1 :: "'a \<Rightarrow> 'm::ab_semigroup_add"
+    and M2 :: "'b \<Rightarrow> 'm"
+    and f :: "'b \<Rightarrow> 'a \<Rightarrow> 'a"
+  assumes
+    "(\<And>x l. M1 (f x l) = (M1 l) + (M2 x))"
+  shows
+    "M1 (fold f al s) = fold plus (map M2 al) (M1 s)" using assms
+  by (induction al arbitrary: s, auto simp add: add.commute)
+
+lemma concat_sets:
+  assumes "\<forall>x \<in> set l1. P" "\<forall>x \<in> set l2. P"
+  shows "\<forall>x \<in> set (l1@l2). P" using assms by auto
+
+lemma card_less: "card (f ` set l) \<le> length l"
+  by (meson List.finite_set card_image_le card_length dual_order.trans)
+
+lemma distinct_proj: "distinct_proj f l \<Longrightarrow> distinct l"
+proof (rule ccontr, induction l)
+  case Nil
+  then show ?case by auto
+next
+  case (Cons a l')
+  then show ?case
+  proof (cases "a \<in> set l'")
+    case True
+    then show ?thesis
+      by (metis Cons.prems(1) List.finite_set add.right_neutral add_Suc_right card_image_le card_insert_if card_length distinct_proj.elims(2) leD le_imp_less_Suc list.simps(15) list.size(4))
+  next
+    case False
+    then show ?thesis
+      by (metis Cons.prems(1) Cons.prems(2) List.finite_set card_distinct card_image_le card_length distinct_proj.elims(2) leD not_less_iff_gr_or_eq)
+  qed
+qed
+
+subsection \<open>Specific Helper Lemmas\<close>
+
+lemma empty_valid[simp]: "valid_fib empty"
+  by (simp add: FibHeap.empty_def)
+
+lemma empty_mset[simp]: "mset_fib empty = {#}"
+  unfolding empty_def by auto
+
+lemma empty_valid_fibnode[intro]: "valid_fibnode (Node m v [])" by auto
+
+lemma mset_fibnode_ne: "mset_fibnode n \<noteq> {#}"
+  by (cases n, auto)
+
+lemma is_empty_mset[simp]: "is_empty q = (mset_fib q = {#})" unfolding is_empty_def
+  by (cases q, auto simp add: mset_fibnode_ne)
+
+lemma mset_fibnode_add: "mset_fibnode (Node m v (Node m2 v2 c2 # ns)) =
+    mset_fibnode (Node m v ns) + mset_fibnode (Node m2 v2 c2)"
+  by simp
+
+lemma [simp]: "cons_to_fib [] = empty" unfolding cons_to_fib_def by auto
+
+lemma [simp]: "valid_fib_min2 (H m [])"
+  by (cases m, auto)
+
+lemma heap_intro[consumes]: "\<lbrakk>q = E \<Longrightarrow> P; (\<And>m v c rs. q = (H (Node m v c) rs) \<Longrightarrow> P) \<rbrakk> \<Longrightarrow> P" using get_min.cases
+  by metis
+
+lemma heap_intro2: "\<lbrakk>Q E \<Longrightarrow> P E ; (\<And>m v c rs. Q (H (Node m v c) rs) \<Longrightarrow> P (H (Node m v c) rs)) \<rbrakk> \<Longrightarrow> (Q h \<Longrightarrow> P h)"
+  by (metis get_min.cases)
+
+lemma valid_min_dual1: "valid_fib_min (H (Node m v c) rs) \<Longrightarrow> valid_fib_min2 (H (Node m v c) rs)"
+  by (induction rule: valid_fib_min.induct, cases rs, auto)
+
+lemma valid_min_dual2: "valid_fib_min2 (H (Node m v c) rs) \<Longrightarrow> valid_fib_min (H (Node m v c) rs)"
+  by (induction rule: valid_fib_min.induct, cases rs, auto)
+
+lemma valid_min_dual: "valid_fib_min2 h \<longleftrightarrow> valid_fib_min h"
+  apply (cases h rule: heap_intro)
+  apply (simp)
+  using valid_min_dual1 valid_min_dual2 by metis
+
+lemma valid_fibnode_dual: "valid_fibnode n \<longleftrightarrow> valid_fibnode2 n"
+  by (induction rule: valid_fibnode.induct, simp, fastforce)
+
+lemma mset_fibnodes: "mset_fibnodes rs = fold plus (map mset_fibnode rs) {#}"
+  by (induction rs, auto simp add: fold_plus_sum_list_rev)
+
+lemma mset_fibnodes_add[simp]: "mset_fibnodes (c @ rs) = mset_fibnodes c + mset_fibnodes rs"
+  by (induction c, auto)
+
+lemma valid_fib_add_fibnodes: "valid_fib (H m rs1) \<Longrightarrow> \<forall>n \<in> set rs2. valid_fibnode n \<and> val m \<le> val n \<Longrightarrow>
+  valid_fib (H m (rs1@rs2))"
+proof (goal_cases)
+  case 1
+  then have "valid_fib_min2 (H m rs1)" using valid_min_dual[symmetric] by auto
+  then have "\<forall>n \<in> set rs1. val m \<le> val n"
+    by (metis fibnode.collapse valid_fib_min2.simps(2))
+  with 1 have "\<forall>n \<in> set (rs1@rs2). val m \<le> val n" using concat_sets by auto
+  then have "valid_fib_min (H m (rs1@rs2))" using valid_min_dual
+    by (metis fibnode.sel(2) mset_fibnode.cases valid_fib_min2.simps(2))
+
+  moreover have "valid_fib_nodes (H m (rs1@rs2))" using 1
+    by auto
+
+  ultimately show ?case by auto
+qed
+
+lemma valid_fibnodes_fibo_cons[simp]: "\<lbrakk> valid_fibnodes_fibo a ; valid_fibnodes_fibo b \<rbrakk>
+  \<Longrightarrow> valid_fibnodes_fibo (a @ b)"
+  by (induction a, auto)
+
+lemma degree_zero[simp]: "degree (Node m v []) = 0" unfolding degree_def by auto
+lemma degree_cons[simp]: "degree (Node m v (Node m2 v2 c2 # c)) = Suc (degree (Node m v c))"
+  unfolding degree_def by auto
+
+subsection \<open>Functional Invariants\<close>
+
+lemma insert_node_aux1: "valid_fib_min (H m rs) \<Longrightarrow> val m < val n \<Longrightarrow> valid_fib_min (H m (n # rs))"
+  by (metis dual_order.strict_implies_order fibnode.collapse valid_fib_min.simps(3))
+
+lemma insert_node_aux2: "valid_fib_min (H m rs) \<Longrightarrow> val n \<le> val m \<Longrightarrow> valid_fib_min (H n (m # rs))"
+proof (goal_cases)
+  case 1
+  have "valid_fib_min2 (H m rs) \<Longrightarrow> val n \<le> val m \<Longrightarrow> valid_fib_min2 (H n (m # rs))"
+    by (metis (no_types, lifting) dual_order.trans fibnode.collapse set_ConsD valid_fib_min2.simps(2))
+  then show ?case using valid_min_dual 1 by auto
+qed
+
+lemma insert_node_inv: "\<lbrakk> valid_fibnode n ; valid_fib h \<rbrakk> \<Longrightarrow> valid_fib (insert_node n h)"
+  by (cases h, auto simp add: insert_node_aux1 insert_node_aux2)
+
+lemma insert_inv: "valid_fib h \<Longrightarrow> valid_fib (insert x h)" unfolding insert_def
+  apply (cases h rule: heap_intro)
+   apply simp
+  apply (rule insert_node_inv)
+  by auto
+
+lemma link_inv: "\<lbrakk> valid_fibnode n1 ; valid_fibnode n2 \<rbrakk> \<Longrightarrow> valid_fibnode (link n1 n2)"
+  by (cases n1, cases n2, auto)
+
+lemma cons_merge_inv: "\<lbrakk> valid_cons_list cs ; valid_fibnode n \<rbrakk> \<Longrightarrow> valid_cons_list (cons_merge n cs)"
+  by (induction n cs rule: cons_merge.induct, auto simp add: link_inv)
+
+lemma cons_to_fib_inv: "\<lbrakk> valid_fib h ; valid_cons_list cs \<rbrakk> \<Longrightarrow> valid_fib (cons_to_fib_aux cs h)"
+proof (induction cs h rule: cons_to_fib_aux.induct)
+  case (1 h)
+  then show ?case by auto
+next
+  case (2 n cs h)
+  then show ?case
+    by (metis cons_to_fib_aux.simps(2) insert_node_inv valid_cons_list.simps(2))
+qed
+
+lemma consolidate_inv: "\<forall>n \<in> set ns. valid_fibnode n \<Longrightarrow> valid_fib (consolidate ns)"
+proof -            
+  assume "\<forall>n \<in> set ns. valid_fibnode n"
+  then have "valid_cons_list (fold cons_merge ns [])"
+    by (simp add: fold_invariant[of ns valid_fibnode] cons_merge_inv)
+  then show "valid_fib (consolidate ns)" using cons_to_fib_inv
+    by (metis cons_to_fib_def consolidate_def empty_valid)
+qed
+
+lemma delete_inv_aux: "valid_fib (H (Node m v c) rs) \<Longrightarrow> valid_fib (delete_min (H (Node m v c) rs))"
+proof -         
+  assume "valid_fib (H (Node m v c) rs)"
+  then have "valid_fibnode (Node m v c) \<and> (\<forall>r \<in> set rs. valid_fibnode r)" by auto
+  then have "(\<forall>r \<in> set c. valid_fibnode r) \<and> (\<forall>r \<in> set rs. valid_fibnode r)"
+    by (simp add: valid_fibnode_dual)
+  then have "\<forall>n \<in> set (c @ rs). valid_fibnode n" by auto
+
+  then show "valid_fib (delete_min (H (Node m v c) rs))" using consolidate_inv
+    by (metis delete_min.simps(2))
+qed
+
+lemma delete_inv: "valid_fib q \<Longrightarrow> mset_fib q \<noteq> {#} \<Longrightarrow> valid_fib (delete_min q)"
+  apply (cases q rule: heap_intro, simp)
+  using delete_inv_aux by metis
+
+lemma merge_inv: "\<lbrakk> valid_fib q1 ; valid_fib q2 \<rbrakk> \<Longrightarrow> valid_fib (merge q1 q2)"
+proof ((cases q1 ; cases q2 ) , goal_cases)
+  case (4 m1 rs1 m2 rs2)
+
+  then show ?case
+  proof (cases "val m1 \<le> val m2")
+    case True
+    then have "\<forall>n \<in> set rs2. valid_fibnode n \<and> val m1 \<le> val n" using 4
+      by (metis dual_order.trans fibnode.collapse valid_fib.elims(2) valid_fib_min2.simps(2) valid_fib_nodes.simps(2) valid_min_dual1)
+    moreover have "valid_fib (H m1 rs1)" using 4 by auto
+    ultimately have "valid_fib (H m1 (rs1@rs2))" using valid_fib_add_fibnodes[of m1 rs1 rs2] by auto
+    then show ?thesis using True 4 insert_node_inv
+      by (metis merge.simps(3) valid_fib.simps valid_fib_nodes.simps(2)) 
+  next
+    case False
+    then have "\<forall>n \<in> set rs1. valid_fibnode n \<and> val m2 \<le> val n" using 4
+      by (metis dual_order.trans fibnode.collapse le_cases valid_fib.elims(2) valid_fib_min2.simps(2) valid_fib_nodes.simps(2) valid_min_dual1)
+    moreover have "valid_fib (H m2 rs2)" using 4 by auto
+    ultimately have "valid_fib (H m2 (rs2@rs1))" using valid_fib_add_fibnodes[of m2 rs2 rs1] by auto
+    then show ?thesis using False 4 insert_node_inv
+      by (metis merge.simps(3) valid_fib.simps valid_fib_nodes.simps(2)) 
+  qed
+qed (auto)
+
+subsection \<open>Functional Correctness\<close>
+
+lemma fib_empty: "mset_fib h = {#} \<longleftrightarrow> is_empty h"
+  by (cases h rule: heap_intro, auto simp add: is_empty_def)
+
+lemma fib_add1: "mset_fibnodes (x1 # Node False v [] # x2) = add_mset v (mset_fibnodes (x1 # x2))"
+  by (cases x1, auto)
+
+lemma fib_ins_node[simp]: "mset_fib (insert_node n h) = mset_fib h + mset_fibnode n"
+  by (induction n h rule: insert_node.induct, auto)
+
+lemma fib_ins[simp]: "mset_fib (insert v h) = mset_fib h + {#v#}" unfolding insert_def
+  by (induction h, auto simp add: fib_add1)
+
+lemma fibnode_min:
+  assumes "valid_fibnode (Node m v c)"
+  shows "val (Node m v c) = Min_mset (mset_fibnode (Node m v c))" using assms
+proof (induction rule: valid_fibnode.induct)
+  case (1 m v)
+  then show ?case by auto
+next
+  case (2 m v m2 v2 c2 ns)
+
+  let ?sa = "set_mset (mset_fibnode (Node m2 v2 c2))"
+  let ?sb = "set_mset (mset_fibnode (Node m v ns))"
+
+  have ne: "?sa \<noteq> {}" "?sb \<noteq> {}" using mset_fibnode_ne by auto
+  have fin: "finite ?sa" "finite ?sb" using finite_set_mset by auto
+
+  have "v \<le> v2" using 2 by auto
+  moreover have "v2 = Min ?sa" using 2 by auto
+  moreover have "v = Min ?sb" using 2 by auto
+  ultimately have "v = Min (?sa \<union> ?sb)" using sets_min[of v v2 ?sb ?sa] ne fin
+    by (metis sup_commute)
+
+  then show ?case using mset_fibnode_add
+    by fastforce
+qed
+
+lemma fibnode_getmin: "valid_fibnode n \<Longrightarrow> get_min (H n []) = Min_mset (mset_fibnode n)"
+  using fibnode_min
+  by (cases n, auto)
+
+lemma fib_min:
+  assumes "valid_fib h" "mset_fib h \<noteq> {#}"
+    shows "get_min h = Min_mset (mset_fib h)" using assms
+proof (induction rule: valid_fib_min.induct)
+  case 1
+  then show ?case by auto
+next
+  case (2 uu)
+  then show ?case using fibnode_getmin
+    by auto
+next
+  case (3 m1 v1 c1 m2 v2 c2 rs)
+
+  let ?n1 = "Node m1 v1 c1"
+  let ?n2 = "Node m2 v2 c2"
+
+
+  have vless: "v1 \<le> v2" using 3 by auto
+
+  have "valid_fibnode ?n2" using 3 by auto
+  then have "Min_mset (mset_fib (H ?n1 rs) + mset_fibnode ?n2) =
+    Min_mset (mset_fib (H ?n1 rs) + {#v2#})" using 3 msets_min_add1[of v2] fibnode_min[of m2 v2 c2]
+    by (metis fibnode.sel(2) mset_fibnode_ne)
+  moreover have "mset_fib (H ?n1 (?n2 # rs)) =
+    mset_fib (H ?n1 rs) + mset_fibnode ?n2"
+    by auto
+
+  ultimately have "Min_mset (mset_fib (H ?n1 (?n2 # rs))) = Min_mset (mset_fib (H ?n1 rs) + {#v2#})"
+    by presburger
+  also have "\<dots> = Min_mset (mset_fib (H ?n1 rs))" using vless msets_min_add2
+    by (metis mset_fib.simps(2) mset_fibnode.simps union_mset_add_mset_left union_single_eq_member)
+  also have "\<dots> = v1" using 3 by auto
+
+  finally show ?case by auto
+qed
+
+lemma link_same[simp]: "mset_fibnode (link n1 n2) = mset_fibnode n1 + mset_fibnode n2"
+  by (induction n1 n2 rule: link.induct, auto)
+
+lemma cons_merge_mset[simp]: "mset_fibnodes (cons_merge n cs) = mset_fibnodes cs + mset_fibnode n"
+  by (induction n cs rule: cons_merge.induct, auto)
+
+lemma cons_merge_fold_mset[simp]: "mset_fibnodes (fold cons_merge rs []) = mset_fibnodes rs"
+  using fold_measure[of mset_fibnodes cons_merge mset_fibnode rs "[]"] mset_fibnodes[of rs] cons_merge_mset
+  by (simp)
+
+lemma cons_to_fib_aux_mset: "mset_fib (cons_to_fib_aux cs h) = mset_fib h + mset_fibnodes cs"
+  by (induction cs h rule: cons_to_fib_aux.induct, auto)
+
+lemma cons_to_fib_mset[simp]: "mset_fib (cons_to_fib cs ) = mset_fibnodes cs" unfolding cons_to_fib_def
+  using cons_to_fib_aux_mset[of cs empty] by auto
+
+lemma cons_merge_to_fib_mset[simp]: "mset_fib (cons_to_fib (fold cons_merge ns [])) = mset_fibnodes ns"
+  by auto
+
+lemma consolidate_same: "mset_fib (consolidate ns) = mset_fibnodes ns" unfolding consolidate_def
+  by auto
+
+lemma delete_mset_aux: "mset_fib (delete_min (H (Node m v c) rs)) = mset_fib (H (Node m v c) rs) - {#v#}"
+  by (auto simp add: consolidate_same)
+
+lemma delete_mset[simp]: "valid_fib q \<Longrightarrow> mset_fib q \<noteq> {#} \<Longrightarrow>
+    mset_fib (delete_min q) = mset_fib q - {#get_min q#}"
+  by (cases q rule: heap_intro, auto simp add: consolidate_same)
+
+lemma merge_mset[simp]: "mset_fib (merge q1 q2) = mset_fib q1 + mset_fib q2"
+  by (cases q1 rule: heap_intro, auto, cases q2 rule: heap_intro, auto)
+
+subsection \<open>Priority Queue Instantiation\<close>
+
+(* 
+  here the Fibo heap already satisfies all functional invariants;
+  however, we also want to show the structural properties, so we comment it here and show a more
+  complete version further down
+*)
+(*interpretation fib: Priority_Queue_Merge
+where empty = empty and is_empty = is_empty
+and insert = insert and del_min = delete_min
+and get_min = get_min and merge = merge
+and invar = valid_fib and mset = mset_fib
+proof (unfold_locales, goal_cases)
+  case 1
+  then show ?case by auto
+next
+  case (2 q)
+  then show ?case by auto
+next
+  case (3 q x)
+  then show ?case by auto
+next
+  case (4 q)
+  then show ?case by auto
+next
+  case (5 q)
+  then show ?case using fib_min by auto
+next
+  case 6
+  then show ?case using empty_valid by auto
+next
+  case (7 q x)
+  then show ?case using insert_inv by auto
+next
+  case (8 q)
+  then show ?case using delete_inv by auto
+next
+  case (9 q1 q2)
+  then show ?case by auto
+next
+  case (10 q1 q2)
+  then show ?case using merge_inv by auto
+qed*)
+
+subsection \<open>Structural Invariants\<close>
+
+lemma insert_fibo: "valid_fib_fibo h \<Longrightarrow> valid_fib_fibo (FibHeap.insert x h)" unfolding insert_def
+  by (cases h, auto)
+
+lemma link_degree: "(degree n1 = degree n2) \<Longrightarrow> (degree (link n1 n2) = Suc (degree n1))"
+  unfolding degree_def by (cases n1 ; cases n2 ; auto)
+
+lemma link_fibo: "\<lbrakk> degree n1 = degree n2 ; valid_fibnode_fibo n1 ; valid_fibnode_fibo n2 \<rbrakk> \<Longrightarrow> valid_fibnode_fibo (link n1 n2)"
+  by (cases n1, cases n2, auto)
+
+lemma cons_merge_incr: "\<lbrakk> degree n > x ; \<forall>n \<in> set ns. degree n > x \<rbrakk>
+   \<Longrightarrow> \<forall>n \<in> set (cons_merge n ns). degree n > x"
+  apply (induction n ns rule: cons_merge.induct, simp)
+  by (metis (no_types, lifting) cons_merge.simps(2) less_SucI link_degree list.set_intros(1) list.set_intros(2) set_ConsD)
+
+lemma cons_merge_sorted:
+  assumes "degree n2 < degree n"
+    "sorted_wrt op < (map degree rs) \<Longrightarrow> sorted_wrt op < (map degree (cons_merge n rs))"
+    "sorted_wrt op < (degree n2 # map degree rs)" 
+  shows "sorted_wrt op < (degree n2 # map degree (cons_merge n rs))"
+proof -
+  from assms have s: "sorted_wrt op < (map degree (cons_merge n rs))"
+    by (meson assms(2) assms(3) sorted_wrt_Cons transp_less)
+
+  with assms cons_merge_incr[of "degree n2" n rs]
+    have "\<forall>n \<in> set (cons_merge n rs). degree n > degree n2"
+      by (metis (full_types) in_set_conv_decomp list.simps(9) map_append sorted_wrt_Cons transp_less)
+  
+  then show ?thesis using assms s sorted_wrt_ConsI[of "op <" "map degree (cons_merge n rs)" "degree n2"]
+    by force
+qed
+
+lemma cons_merge_fibo: "\<lbrakk> valid_fibnodes_fibo cs ; valid_fibnode_fibo n  \<rbrakk>
+  \<Longrightarrow> valid_fibnodes_fibo (cons_merge n cs)"
+  by (induction n cs rule: cons_merge.induct, auto simp add: sorted_wrt_Cons link_fibo)
+
+lemma cons_to_fib_fibo: "\<lbrakk> valid_fib_fibo h ; valid_fibnodes_fibo cs \<rbrakk> 
+  \<Longrightarrow> valid_fib_fibo (cons_to_fib_aux cs h)"
+  apply (induction cs h rule: cons_to_fib_aux.induct, auto)
+  by (metis insert_node.elims insert_node.simps(1) valid_fib_fibo.simps(2) valid_fibnodes_fibo.simps(1) valid_fibnodes_fibo.simps(2))
+
+thm fold_invariant[of cs valid_fibnode_fibo valid_fibnodes_fibo "[]" cons_merge]
+
+lemma consolidate_fibo: "valid_fibnodes_fibo cs \<Longrightarrow> valid_fib_fibo (consolidate cs)" unfolding consolidate_def
+proof -
+  assume "valid_fibnodes_fibo cs"
+  then have "(\<And>x. x \<in> set cs \<Longrightarrow> valid_fibnode_fibo x)"
+    by (induction cs, auto)
+  moreover have "valid_fibnodes_fibo []" by auto
+  moreover have "(\<And>x s. valid_fibnode_fibo x \<Longrightarrow> valid_fibnodes_fibo s \<Longrightarrow> valid_fibnodes_fibo (cons_merge x s))"
+    using cons_merge_fibo by auto
+  ultimately have "valid_fibnodes_fibo (fold cons_merge cs [])" 
+    using fold_invariant[of cs valid_fibnode_fibo valid_fibnodes_fibo "[]" cons_merge] by auto
+
+  then show "valid_fib_fibo (cons_to_fib (fold cons_merge cs []))"
+    by (simp add: cons_to_fib_fibo FibHeap.empty_def cons_to_fib_def)
+qed
+
+lemma delete_fibo: "valid_fib_fibo h \<Longrightarrow> valid_fib_fibo (delete_min h)"
+proof (cases h rule: heap_intro , goal_cases)
+  case 1
+  then show ?case by auto
+next
+  case (2 m v c rs)
+  then have val: "valid_fib_fibo (H (Node m v c) rs)" by auto
+  then have "valid_fibnode_fibo (Node m v c)" by simp
+  then have "valid_fibnodes_fibo c" by simp
+
+  moreover from val have "valid_fibnodes_fibo rs" by simp
+
+  ultimately have "valid_fibnodes_fibo (c @ rs)" by simp
+  
+  then show ?case
+    by (simp add: consolidate_fibo "2"(2))
+qed
+
+lemma merge_fibo: "\<lbrakk> valid_fib_fibo h1 ; valid_fib_fibo h2 \<rbrakk> \<Longrightarrow> valid_fib_fibo (merge h1 h2)"
+  by (cases h1 ; cases h2 ; auto)
+
+subsection \<open>Priority Queue Instantiation with Structural Invariants\<close>
+
+interpretation fib: Priority_Queue_Merge
+where empty = empty and is_empty = is_empty
+and insert = insert and del_min = delete_min
+and get_min = get_min and merge = merge
+and invar = valid_fib_all and mset = mset_fib
+proof (unfold_locales, goal_cases)
+  case 1
+  then show ?case by auto
+next
+  case (2 q)
+  then show ?case by auto
+next
+  case (3 q x)
+  then show ?case by auto
+next
+  case (4 q)
+  then show ?case by auto
+next
+  case (5 q)
+  then show ?case using fib_min by auto
+next
+  case 6
+  then show ?case using empty_valid
+    by (simp add: FibHeap.empty_def)
+next
+  case (7 q x)
+  then show ?case using insert_inv insert_fibo by auto
+next
+  case (8 q)
+  then show ?case using delete_inv delete_fibo by auto
+next
+  case (9 q1 q2)
+  then show ?case by auto
+next
+  case (10 q1 q2)
+  then show ?case using merge_inv merge_fibo by auto
+qed
+
+subsection \<open>Distinct Degrees after Consolidate\<close>
+(* these degree-guarantees aren't actually necessary as invariants, but they might be useful *)
+
+lemma cons_merge_degrees: "valid_cons_list_degrees cs \<Longrightarrow> valid_cons_list_degrees (cons_merge n cs)"
+proof (induction n cs rule: cons_merge.induct)
+  case (1 n)
+  then show ?case by auto
+next
+  case (2 n n2 rs)
+  then show ?case
+  proof (cases "degree n > degree n2")
+    case True
+    then show ?thesis using 2
+      by (simp add: cons_merge_sorted)
+  next
+    case False
+    then show ?thesis using 2
+      by (simp add: sorted_wrt_Cons)
+  qed
+qed
+
+lemma insert_node_degrees: 
+  assumes
+  "fib_degrees_distinct h"
+  "\<And>m rs. (h = (H m rs) \<Longrightarrow> degree n \<notin> (degree ` set (m # rs)))"
+shows "fib_degrees_distinct (insert_node n h)" using assms
+proof (cases h)
+  case E
+  then show ?thesis by auto
+next
+  case (H m rs)
+
+  then obtain m' rs' where h': "H m' rs' = insert_node n h" by force
+
+  then have l: "length (m' # rs') = length (m # rs) + 1"
+    by (metis H One_nat_def fib.sel(2) insert_node.simps(2) list.size(4))
+  moreover have news: "set (m' # rs') = Set.insert n (set (m # rs))" using h'
+    by (metis (mono_tags, lifting) H insert_commute insert_node.simps(2) list.simps(15) set_of_fibnodes.simps(2))
+  moreover have "(card (degree ` set (m # rs)) = length (m # rs))" using assms H by auto
+
+  ultimately have "(card (degree ` Set.insert n (set (m # rs))) = length (m # rs) + 1)" using assms h' H by auto
+
+  then show ?thesis
+    by (metis distinct_proj.simps fib_degrees_distinct.simps(2) h' l news)
+qed
+
+lemma cons_to_fib_degrees:
+  assumes
+  "valid_cons_list_degrees cs"
+  "fib_degrees_distinct h"
+  "\<And>m rs. h = (H m rs) \<Longrightarrow> set (map degree (m # rs)) \<inter> set (map degree cs) = {}"
+shows "fib_degrees_distinct (cons_to_fib_aux cs h)"
+  using assms
+  apply (induction cs h rule: cons_to_fib_aux.induct ; clarsimp)
+proof (goal_cases)
+  case (1 n cs h)
+  note IH = 1
+  then show ?case
+  proof (intro IH(1) , goal_cases)
+    case 1
+    then show ?case
+      by (meson sorted_wrt_Cons transp_less)
+  next
+    case 2
+    then show ?case
+    proof (intro insert_node_degrees , goal_cases)
+      case 1
+      then show ?case by auto
+    next
+      case (2 m rs)
+      then have "degree n \<noteq> degree m \<and> degree n \<notin> degree ` set rs"
+        by simp
+      then show ?case by auto
+    qed
+  next
+    case (3 m' rs')
+    then show ?case
+    proof (cases h)
+      case E
+      then show ?thesis
+        by (metis "3"(8) IH(2) Int_emptyI empty_iff fib.sel(1) fib.sel(2) image_empty insert_node.simps(1) less_irrefl list.set(1) list.set_map sorted_wrt_Cons transp_less) 
+    next
+      case (H m rs)
+      with 3 have disj: "degree n \<noteq> degree m \<and> degree n \<notin> degree ` set rs \<and> degree m \<notin> degree ` set cs \<and> degree ` set rs \<inter> degree ` set cs = {}"
+        by auto
+      
+      have notin: "degree n \<notin> degree ` set cs" using 3(2)
+        by (metis less_imp_neq set_map sorted_wrt_Cons transp_less)
+
+      consider (MN) "m' = m \<and> rs' = n # rs" | (NM) "m' = n \<and> rs' = m # rs"
+        by (metis "3"(8) H fib.inject insert_node.simps(2))
+      
+      then show ?thesis using disj notin
+        by (metis (no_types, lifting) Int_insert_right_if0 image_insert inf_commute list.simps(15))
+    qed
+  qed
+qed
+
+lemma consolidate_degrees[simp]:
+  "fib_degrees_distinct (consolidate ns)" unfolding consolidate_def cons_to_fib_def
+proof -
+  have "valid_cons_list_degrees (fold cons_merge ns [])"
+    apply (intro fold_invariant[where ?Q="\<lambda>x. True" and ?P="valid_cons_list_degrees" and ?f="cons_merge" and ?xs=ns and ?s="[]"])
+    prefer 3
+    by (rule cons_merge_degrees, auto)
+  then show "fib_degrees_distinct (cons_to_fib_aux (fold cons_merge ns []) FibHeap.empty)"
+    using cons_to_fib_degrees[of "(fold cons_merge ns [])" empty] unfolding empty_def by auto
+qed
+
+lemma delete_min_degrees:
+  "h \<noteq> empty \<Longrightarrow> fib_degrees_distinct (delete_min h)"
+  by (cases h rule: heap_intro, auto)
+
+end
+--=_9e0110db7222e7245ec3c1f7e25e8c06--
+
+From sabine.rieder@tum.de Thu Jul 12 15:30:49 2018
+Return-Path: <sabine.rieder@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ NVlwIglYR1tZIQAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 15:30:49 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 8BC1E1C202C
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 15:30:49 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 0F09E1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 15:30:48
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 877EA1C03B6; Thu, 12 Jul 2018 15:30:49 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 849CE1C04EA; Thu, 12 Jul 2018 15:30:49 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id 5EFFF1C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:49 +0200
+ (CEST)
+Received: from vmmaildmz1.informatik.tu-muenchen.de
+ (vmmaildmz1.informatik.tu-muenchen.de [131.159.0.87]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 542411C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:49 +0200 (CEST)
+Received: by vmmaildmz1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 5287B1C2DD0; Thu, 12 Jul 2018 15:30:49 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz1.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz1.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTP id CE3FA1C2DD2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:39 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz1.informatik.tu-muenchen.de (Postfix) with ESMTPS id C344D1C2DBD
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:39 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41RGz35FxmzyXW for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:39 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531402239;
+ bh=zhque+G87nB5FJuY6Ep5YE3xsy5vOFR4zEFV4UTforY=; b=YhzYaIWbsSm5
+ KkWY0rnOB3xBs/uHG0eV7/4ZDKQKP6M/sFRbne5rsvL0dUxtED+LZWPt8c25Cwl5
+ zTSV1lLfwECMr4vYfLvMYlqYoFhkNkjEtTo+pPuuz8eTJf8Xjzv7y5YDmb/nNXRi
+ P3zgfcdk29hTfnlrHHiC6249eMyqZ5SRH3r+/aCA1nNO+ox03j7lk1UxQpXYNn3V
+ BoLHXQGwsDBwGymBIqpjm1nBpE0DFJ5LNJuV6qsQul61omriyxgNGyY3Qx64vy8b
+ wsEPSduVB3wYmJ1yxJ5PZqraVt0USPBXVFqqj2H8kyl33aDX7ovNIPlCe1d9sL9V
+ Q8sU9zyofQ==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ AV_TZWzw96lw for <lammich@in.tum.de>; Thu, 12 Jul 2018 15:30:39 +0200 (CEST)
+Received: from BADWLRZ-SWMBX02.ads.mwn.de (BADWLRZ-SWMBX02.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::158]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX02",
+ Issuer "BADWLRZ-SWMBX02" (not verified)) by postout2.mail.lrz.de (Postfix)
+ with ESMTPS id 41RGz33DKVzyWN for <lammich@in.tum.de>; Thu, 12 Jul 2018
+ 15:30:39 +0200 (CEST)
+Received: from BADWLRZ-SWMBX09.ads.mwn.de (2001:4ca0:0:108::165) by
+ BADWLRZ-SWMBX02.ads.mwn.de (2001:4ca0:0:108::158) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Thu, 12 Jul 2018 15:30:37 +0200
+Received: from BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c]) by
+ BADWLRZ-SWMBX09.ads.mwn.de ([fe80::28c9:20b8:a4d6:473c%12]) with mapi id
+ 15.01.1531.003; Thu, 12 Jul 2018 15:30:37 +0200
+From: "Rieder, Sabine" <sabine.rieder@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Project
+Thread-Topic: [FDS] Project
+Thread-Index: AQHUGeRzxlhFNuYRf0KrC9eUivd0lA==
+Date: Thu, 12 Jul 2018 13:30:37 +0000
+Message-ID: <3827077dc5b148cb88a18165de10b21b@tum.de>
+Accept-Language: de-DE, en-US
+Content-Language: de-DE
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX09.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [2003:ee:abcd:ad57:b8aa:4bae:28ce:eb89]
+Content-Type: multipart/mixed; boundary="_004_3827077dc5b148cb88a18165de10b21btumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_3827077dc5b148cb88a18165de10b21btumde_
+Content-Type: multipart/alternative; boundary="_000_3827077dc5b148cb88a18165de10b21btumde_"
+
+
+--_000_3827077dc5b148cb88a18165de10b21btumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Peter,
+
+Please find my project file attached.
+
+
+Best Regards,
+
+Sabine Rieder
+
+--_000_3827077dc5b148cb88a18165de10b21btumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
+<p>Dear Peter,</p>
+<p>Please find my project file attached.</p>
+<p><br>
+</p>
+<p>Best Regards,</p>
+<p>Sabine Rieder<br>
+</p>
+</div>
+</body>
+</html>
+
+--_000_3827077dc5b148cb88a18165de10b21btumde_--
+
+--_004_3827077dc5b148cb88a18165de10b21btumde_
+Content-Type: application/octet-stream; name="Radix_Sort_f.thy"
+Content-Description: Radix_Sort_f.thy
+Content-Disposition: attachment; filename="Radix_Sort_f.thy"; size=8808; creation-date="Thu, 12 Jul 2018 13:30:23 GMT"; modification-date="Thu, 12 Jul 2018 13:30:23 GMT"
+Content-Transfer-Encoding: base64
+
+dGhlb3J5IFJhZGl4X1NvcnRfZgogIGltcG9ydHMgTWFpbiAiSE9MLUxpYnJhcnkuTGlzdF9sZXhv
+cmQiCmJlZ2luCigqU2hvdWxkIGltcGxlbWVudCByYWRpeFNvcnQuIFRoZSBmdW5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m9vbCIKCnZhbHVlICJzb3J0X2Jvb2xfbGlzdHMgWyhbVHJ1ZSwgRmFsc2VdLCAyKSwgKFtU
+cnVlLCBUcnVlXSwgMildIDIiCgoKCgoKCgoKZW5k
+
+--_004_3827077dc5b148cb88a18165de10b21btumde_--
+
+From martin.rau@tum.de Thu Jul 12 16:22:48 2018
+Return-Path: <martin.rau@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ lErlEDJkR1voOQAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 16:22:48 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id 1C5BA1C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 16:22:48 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 8F1E31E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 16:22:46
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ 18B301C03B6; Thu, 12 Jul 2018 16:22:48 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id 165D11C04EA; Thu, 12 Jul 2018 16:22:48 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id E5BAC1C04E8 for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:22:47 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id DB42D1C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:22:47 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id D9AB61C03CA; Thu, 12 Jul 2018 16:22:47 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED autolearn=no autolearn_force=no
+ version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id E4ED91C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:22:45 +0200 (CEST)
+Received: from forwout1.mail.lrz.de (forwout1.mail.lrz.de
+ [129.187.255.130]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id D9F2E1C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:22:45 +0200 (CEST)
+Received: from postforw2.mail.lrz.de (postforw.mail.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:63e]) by forwout1.mail.lrz.de (Postfix) with
+ ESMTP id 41RJ795z44zCV for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:22:45
+ +0200 (CEST)
+Received: from postout2.mail.lrz.de (lxmhs52.srv.lrz.de
+ [IPv6:2001:4ca0:0:116::a9c:641]) by postforw2.mail.lrz.de (Postfix) with
+ ESMTP id 41RJ795s8szyVh for <peter.lammich@tum.de>; Thu, 12 Jul 2018
+ 16:22:45 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41RJ795dt1zyWp for
+ <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:22:45 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ content-language:content-type:content-type:mime-version
+ :user-agent:date:date:message-id:subject:subject:from:from
+ :received:received; s=postout; t=1531405365; bh=JZSzhnL4XgpiM/pH
+ xA/D4ZPiWrrB4K7x+88nsHzGr7w=; b=HomN1ZjmadkyzsbZ3HFB2SjEaGdLoObA
+ XA2bgzLalR4lYNAtY5dQ70Mir+e1WcW1H65Z5BWqq8o2dM7KtgF97UUBjMwSisJ/
+ uK0DHGOHB6CZf0QGs24YFG4hFQxGed6r2BBQXQl/1+m3yIdn5+UHZH8OchTqs/wc
+ Wr4dYMGouQHz+AzwKjzEXOp+A9kjiZHuLBgIoaAZ8scM/Xd1yIFPtpyVpNcsWrze
+ GyqQVcM1qzAYOBfq5fOlA2s4yqO+0vwGXB0ILuLABn58R3oqLLm2cxzBA0s/0wGN
+ echZvR6dwa2ewSfyRqKcY1A375nwh39jCTjCfvhpuCy2Gg0tlooG1g==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ O4H08O5FLhpp for <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:22:45 +0200
+ (CEST)
+Received: from [IPv6:2a02:810d:4240:1778:d91c:ea06:b115:a1d0] (unknown
+ [IPv6:2a02:810d:4240:1778:d91c:ea06:b115:a1d0]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate
+ requested) by postout2.mail.lrz.de (Postfix) with ESMTPSA id 41RJ790G0TzyVm
+ for <peter.lammich@tum.de>; Thu, 12 Jul 2018 16:22:45 +0200 (CEST)
+To: peter.lammich@tum.de
+From: Martin Rau <martin.rau@tum.de>
+Subject: [FDS] Project
+Message-ID: <ab1806a1-e0bf-75d0-0a62-61fb5b569305@tum.de>
+Date: Thu, 12 Jul 2018 16:22:43 +0200
+User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
+ Thunderbird/52.8.0
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------DDAD80104FA3A7240AC49602"
+Content-Language: en-US
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+This is a multi-part message in MIME format.
+--------------DDAD80104FA3A7240AC49602
+Content-Type: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+
+
+--------------DDAD80104FA3A7240AC49602
+Content-Type: text/plain; charset=UTF-8; name="hw_original.thy"
+Content-Disposition: attachment; filename="hw_original.thy"
+Content-Transfer-Encoding: 8bit
+
+theory hw_original
+imports
+  Complex_Main
+  "Hol/Library/Tree"
+begin
+
+text \<open>
+  A k-d tree is a space-partitioning data structure for organizing points in a k-dimensional space.
+  In principle the k-d tree is a binary tree in which every node is a k-dimensional point.
+  Every node divides the space into two parts by splitting along a hyperplane.
+  Consider a node n with associated point p in depth d, counting the number of edges from the root.
+  The splitting hyperplane of this point will be the (d mod k) axis of the associated point p.
+  Let v be the value of p at axis (d mod k). Subsequently all points in the left subtree must have
+  a value at axis (d mod k) that is less or equal than v and all points in the right subtree must
+  have a value at axis (d mod k) that is greater than v.
+
+  e.g.: Consider a 2-d tree. 
+              
+   0/x-axis:                      (7, 2)
+              
+   1/y-axis:           (5,4)               (9,6)
+    
+   0/x-axis:    (2,3)        (4,7)                (8,7)
+\<close>
+
+text \<open>Synonyms for point, axis, dimension and k-d tree.\<close>
+
+type_synonym point = "real list"
+type_synonym axis = nat
+type_synonym dim = nat
+type_synonym kdt = "point tree"
+
+text \<open>
+  First Part:
+
+  Defining the invariant, abstraction and defining insertion into a k-d tree and membership of
+  a k-d tree.
+\<close>
+
+text \<open>Abstraction function relating k-d tree to set:\<close>
+
+fun set_kdt :: "kdt \<Rightarrow> point set" where
+  "set_kdt Leaf = {}"
+| "set_kdt (Node l p r) = {p} \<union> set_kdt l \<union> set_kdt r"
+
+text \<open>The k-d tree invariant:\<close>
+
+fun invar' :: "axis \<Rightarrow> dim \<Rightarrow> kdt \<Rightarrow> bool" where
+  "invar' _ k Leaf \<longleftrightarrow> k > 0"
+| "invar' a k (Node l p r) \<longleftrightarrow> invar' ((a+1) mod k) k l \<and> invar' ((a+1) mod k) k r \<and> 
+    length p = k \<and> (\<forall>q \<in> set_kdt l. q!a \<le> p!a) \<and> (\<forall>q \<in> set_kdt r. q!a > p!a)"
+
+text \<open>Insertion:\<close>
+
+fun ins_kdt' :: "axis \<Rightarrow> dim \<Rightarrow> point \<Rightarrow> kdt \<Rightarrow> kdt" where
+  "ins_kdt' _ _ p Leaf = Node Leaf p Leaf" 
+| "ins_kdt' a k p (Node l x r) = (
+    if p = x then Node l x r
+    else
+      if p!a \<le> x!a then
+        Node (ins_kdt' ((a+1) mod k) k p l) x r
+      else
+        Node l x (ins_kdt' ((a+1) mod k) k p r)
+  )"
+
+text \<open>Membership:\<close>
+
+fun isin_kdt' :: "axis \<Rightarrow> dim \<Rightarrow> point \<Rightarrow> kdt \<Rightarrow> bool" where
+  "isin_kdt' _ _ _ Leaf = False"
+| "isin_kdt' a k p (Node l x r) = (
+    if p = x then True
+    else
+      if p!a \<le> x!a then
+        isin_kdt' ((a+1) mod k) k p l
+      else
+        isin_kdt' ((a+1) mod k) k p r
+  )"
+
+text \<open>Lemmas about Insertion and Membership:\<close>
+
+lemma set_ins_kdt': "invar' a k kdt \<Longrightarrow> length p = k \<Longrightarrow> set_kdt (ins_kdt' a k p kdt) = set_kdt kdt \<union> {p}"
+  by (induction kdt arbitrary: a) auto
+
+lemma invar_ins_kdt': "invar' a k kdt \<Longrightarrow> length p = k \<Longrightarrow> invar' a k (ins_kdt' a k p kdt)"
+  by (induction kdt arbitrary: a) (auto simp add: set_ins_kdt')
+
+lemma isin_kdt': "invar' a k kdt \<Longrightarrow> length p = k \<Longrightarrow> isin_kdt' a k p kdt \<longleftrightarrow> p \<in> set_kdt kdt"
+  by (induction kdt arbitrary: a) auto
+
+text \<open>
+  I would like to drop explicitly passing the splitting axis into every function.
+  Define abbreviations and start splitting at 0th axis.
+  The corresponding Insertion and Membership functions and lemmas in shorter form:
+\<close>
+
+abbreviation invar where "invar \<equiv> invar' 0"
+
+definition ins_kdt :: "point \<Rightarrow> kdt \<Rightarrow> kdt" where
+  "ins_kdt p = ins_kdt' 0 (length p) p"
+
+definition isin_kdt :: "point \<Rightarrow> kdt \<Rightarrow> bool" where
+  "isin_kdt p = isin_kdt' 0 (length p) p"
+
+lemma set_ins_kdt: "invar k kdt \<Longrightarrow> length p = k \<Longrightarrow> set_kdt (ins_kdt p kdt) = set_kdt kdt \<union> {p}"
+  by (simp add: ins_kdt_def set_ins_kdt')
+
+lemma invar_ins_kdt: "invar k kdt \<Longrightarrow> length p = k \<Longrightarrow> invar k (ins_kdt p kdt)"
+  by (simp add: ins_kdt_def invar_ins_kdt')
+
+lemma isin_kdt: "invar k kdt \<Longrightarrow> length p = k \<Longrightarrow> isin_kdt p kdt \<longleftrightarrow> p \<in> set_kdt kdt"
+  by (simp add: isin_kdt' isin_kdt_def)
+
+text \<open>
+  Second Part:
+
+  Verifying k-dimensional queries on the k-d tree.
+  
+  Given two k-dimensional points p1 and p2 which bound the search space, the query should return
+  only the points which satisfy the following criteria:
+
+  For every point x in the resulting set:
+    For every axis a \<in> [0, k-1]:
+      min (p1!a) (p2!a) <= x!a and x!a <= max (p1!a) (p2!a)
+
+  For example: In a 2-d tree a query corresponds to selecting all the points in
+  the rectangle which has p1 and p2 as its defining edges.    
+\<close>
+
+text \<open>
+  Simplifying the problem:
+
+  Assume that the two given points p1 and p2  which define the bounding box are the left lower
+  and the right upper point.
+
+  For every axis a \<in> [0, k-1]:
+    p1!a <= p2!a
+\<close>
+
+text\<open>The query function and auxiliary functions:\<close>
+
+definition is_bounding_box :: "dim \<Rightarrow> point \<Rightarrow> point \<Rightarrow> bool" where
+  "is_bounding_box k b u \<longleftrightarrow> length b = k \<and> length u = k \<and> (\<forall>i < k. b!i \<le> u!i)"
+
+(* I don't want to unfold this definition in the main function *)
+definition point_in_bounding_box :: "dim \<Rightarrow> point \<Rightarrow> point \<Rightarrow> point \<Rightarrow> bool" where
+  "point_in_bounding_box k p b u \<longleftrightarrow> (\<forall>i < k. b!i \<le> p!i \<and> p!i \<le> u!i)"
+
+fun query_area' :: "axis \<Rightarrow> dim \<Rightarrow> point \<Rightarrow> point \<Rightarrow> kdt \<Rightarrow> point set" where
+  "query_area' _ _ _ _ Leaf = {}"
+| "query_area' a k b u (Node l p r) = (
+    if point_in_bounding_box k p b u then
+      {p} \<union> query_area' ((a+1) mod k) k b u l \<union> query_area' ((a+1) mod k) k b u r
+    else
+      if p!a < b!a then
+        query_area' ((a+1) mod k) k b u r
+      else if p!a > u!a then
+        query_area' ((a+1) mod k) k b u l
+      else 
+        query_area' ((a+1) mod k) k b u l \<union> query_area' ((a+1) mod k) k b u r
+  )"
+
+text \<open>Auxiliary lemmas:\<close>
+
+lemma set_kdt_l_lq_a: "invar' a k kdt \<Longrightarrow> kdt = Node l x r \<Longrightarrow> \<forall>p \<in> set_kdt l. p!a \<le> x!a"
+  by (induction kdt arbitrary: a) auto
+
+lemma set_kdt_r_gt_a: "invar' a k kdt \<Longrightarrow> kdt = Node l x r \<Longrightarrow> \<forall>p \<in> set_kdt r. x!a < p!a"
+  by (induction kdt arbitrary: a) auto
+
+lemma invar'_dim_gt_0: "invar' a k kdt \<Longrightarrow> k > 0"
+  by (induction kdt arbitrary: a) auto
+
+lemma l_pibb_empty:
+  assumes "invar' a k kdt" "kdt = Node l x r" "is_bounding_box k b u" "x!a < b!a" "a < k"
+  shows "{ p \<in> set_kdt l. point_in_bounding_box k p b u } = {}"
+  using assms
+proof -
+  have "\<forall>p \<in> set_kdt l. p!a \<le> x!a"
+    using set_kdt_l_lq_a assms(1) assms(2) by blast
+  then have "\<forall>p \<in> set_kdt l. p!a < b!a"
+    using assms(4) by auto
+  then have "\<forall>p \<in> set_kdt l. (\<exists>i < k. p!i < b!i \<or> u!i < p!i)"
+    using assms(5) by blast
+  then have "\<forall>p \<in> set_kdt l. \<not>point_in_bounding_box k p b u"
+    using point_in_bounding_box_def by fastforce
+  then show ?thesis by blast
+qed
+
+lemma r_pibb_empty:
+  assumes "invar' a k kdt" "kdt = Node l x r" "is_bounding_box k b u" "x!a > u!a" "a < k"
+  shows "{ p \<in> set_kdt r. point_in_bounding_box k p b u } = {}"
+  using assms
+proof -
+  have "\<forall>p \<in> set_kdt r. x!a < p!a"
+    using set_kdt_r_gt_a assms(1) assms(2) by blast
+  then have "\<forall>p \<in> set_kdt r. u!a < p!a"
+    using assms(4) by auto
+  then have "\<forall>p \<in> set_kdt r. (\<exists>i < k. p!i < b!i \<or> u!i < p!i)"
+    using assms(5) by blast
+  then have "\<forall>p \<in> set_kdt r. \<not>point_in_bounding_box k p b u"
+   using point_in_bounding_box_def by fastforce
+  then show ?thesis by blast
+qed
+
+text \<open>The main theorem:\<close>
+
+theorem query_area':
+  assumes "invar' a k kdt" "is_bounding_box k b u" "a < k"
+  shows "query_area' a k b u kdt = { p \<in> set_kdt kdt. point_in_bounding_box k p b u }"
+  using assms l_pibb_empty r_pibb_empty
+  by (induction kdt arbitrary: a) auto
+
+text \<open>
+  Again I would like to drop explicitly passing the splitting axis into every function.
+  The corresponding query function and lemmas in shorter form:
+\<close>
+
+definition query_area :: "point \<Rightarrow> point \<Rightarrow> kdt \<Rightarrow> point set" where
+  "query_area b u kdt = query_area' 0 (length b) b u kdt"
+
+theorem query_area:
+  assumes "invar k kdt" "is_bounding_box k b u"
+  shows "query_area b u kdt = { p \<in> set_kdt kdt. point_in_bounding_box k p b u }"
+  using assms invar'_dim_gt_0 is_bounding_box_def query_area' query_area_def by auto
+
+text \<open>
+  Finally un-simplifying the problem:
+
+  Given two arbitrary points p1 and p2 which only satisfy the dimensionality property, 
+  does the query function work?
+
+  Hide the is_bounding_box abstraction:
+\<close>
+
+text \<open>Auxiliary functions and the final query function:\<close>
+
+fun min_max :: "real * real \<Rightarrow> real * real" where
+  "min_max (a, b) = (min a b, max a b)"
+
+definition to_bounding_box :: "point \<Rightarrow> point \<Rightarrow> point * point" where
+  "to_bounding_box p q = (let ivs = map min_max (zip p q) in (map fst ivs, map snd ivs))"
+
+definition query :: "point \<Rightarrow> point \<Rightarrow> kdt \<Rightarrow> point set" where
+  "query p q kdt = (let (b, u) = to_bounding_box p q in query_area b u kdt)"
+
+text \<open>Auxiliary lemmas and the final theorem:\<close>
+
+lemma tbbibb:
+  assumes "k = length p" "k = length q" "(b,u) = to_bounding_box p q"
+  shows "is_bounding_box k b u"
+  using assms by (auto simp add: to_bounding_box_def is_bounding_box_def)
+
+lemma pibb_p_q: 
+  assumes "k = length p" "k = length q" "(b, u) = to_bounding_box p q"
+  shows "point_in_bounding_box k x b u \<longleftrightarrow> (\<forall>i < k. min (p!i) (q!i) \<le> x!i \<and> x!i \<le> max (p!i) (q!i))"
+  using assms by (auto simp add: min_def max_def to_bounding_box_def point_in_bounding_box_def)
+
+theorem query:
+  assumes "invar k kdt" "k = length p" "k = length q"
+  shows "query p q kdt = { x \<in> set_kdt kdt. \<forall>i < k. min (p!i) (q!i) \<le> x!i \<and> x!i \<le> max (p!i) (q!i) }"
+  using assms pibb_p_q tbbibb query_area by (auto simp add: query_def)
+
+end
+--------------DDAD80104FA3A7240AC49602--
+
+From a.putwattana@tum.de Thu Jul 12 16:27:34 2018
+Return-Path: <a.putwattana@tum.de>
+Delivered-To: <lammich@mailstore.informatik.tu-muenchen.de>
+Received: from vmmailstore1.informatik.tu-muenchen.de by
+ vmmailstore1.informatik.tu-muenchen.de (Dovecot) with LMTP id
+ BxX8DMNkR1s7QQAArPjJig for <lammich@mailstore.informatik.tu-muenchen.de>;
+ Thu, 12 Jul 2018 16:27:34 +0200
+Received: from vmmailproxy1.informatik.tu-muenchen.de
+ (vmmailproxy1.informatik.tu-muenchen.de [131.159.0.83]) by
+ vmmailstore1.informatik.tu-muenchen.de (Postfix) with ESMTP id E22101C02DB
+ for <lammich@mailstore.informatik.tu-muenchen.de>; Thu, 12 Jul 2018
+ 16:27:34 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de
+ (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
+ vmmailproxy1.informatik.tu-muenchen.de (Postfix) with ESMTP id 600BD1E0128
+ for <lammich@mail.informatik.tu-muenchen.de>; Thu, 12 Jul 2018 16:27:33
+ +0200 (CEST)
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix) id
+ DCDBA1C0502; Thu, 12 Jul 2018 16:27:34 +0200 (CEST)
+Delivered-To: peter.lammich@informatik.tu-muenchen.de
+Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id D9E2F1C04EC; Thu, 12 Jul 2018 16:27:34 +0200 (CEST)
+Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
+ [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP
+ id B20151C04EA for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:34 +0200
+ (CEST)
+Received: from vmmaildmz2.informatik.tu-muenchen.de
+ (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
+ vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id A776F1C03B6
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:34 +0200 (CEST)
+Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
+ 109) id A618D1C03C8; Thu, 12 Jul 2018 16:27:34 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
+ vmmaildmz2.informatik.tu-muenchen.de
+X-Spam-Level: 
+X-Spam-Status: No, score=-4.3 required=7.0 tests=AWL,BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_MED autolearn=no
+ autolearn_force=no version=3.4.0-tuminfo_1
+Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
+ by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id A18FC1C03C7
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:32 +0200 (CEST)
+Received: from postout2.mail.lrz.de (postout2.mail.lrz.de
+ [129.187.255.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256
+ bits)) (No client certificate requested) by
+ vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 9678D1C03C2
+ for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:32 +0200 (CEST)
+Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by
+ postout2.mail.lrz.de (Postfix) with ESMTP id 41RJDh3k68zyTl for
+ <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:32 +0200 (CEST)
+Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit
+ key) reason="pass (just generated, assumed good)" header.d=tum.de
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h=
+ mime-version:content-type:content-type:content-language
+ :accept-language:message-id:date:date:subject:subject:from:from
+ :received:received:received:received; s=postout; t=1531405652;
+ bh=m49sNVLjSm4/UR0GjtyXpPEXApNiojIsctPFcIN/2vQ=; b=sGbLpvwosjzV
+ fQRVpI1y9KpjnV91PEpPYV9S+F1oI8RToKq2a46TZrNHdzR5LigRYf+ncK0K+1dK
+ YzX4EXuch+aQJxX4fcJqPt9gyy7JwaZ2sTgoGBqg6ETmu7YjVW/WuECYk8vYPZbn
+ RiiG/q4ev7yF21tNV5TD1rvTLxgBMYRtHKG2my5duHlnmVWFT2Fmzai7sD7UjIto
+ SyWKW1PKngfVfANHaqwBItecsmYCpAK9qzFhMur+1RxKi3s9q/gSgsCYF7wvpw2J
+ D31RB+TrGYSg8MsliSuMr867Kw0GHwp0bVxNroEpgKe3eQX3L1Rhp2lLL4Tl0haL
+ /7a3TAzSCQ==
+X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de
+Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de
+ (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id
+ YFFRghjJtAS2 for <lammich@in.tum.de>; Thu, 12 Jul 2018 16:27:32 +0200 (CEST)
+Received: from BADWLRZ-SWMBX07.ads.mwn.de (BADWLRZ-SWMBX07.ads.mwn.de
+ [IPv6:2001:4ca0:0:108::163]) (using TLSv1.2 with cipher
+ ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "BADWLRZ-SWMBX07",
+ Issuer "BADWLRZ-SWMBX07" (not verified)) by postout2.mail.lrz.de (Postfix)
+ with ESMTPS id 41RJDg4byMzyWn for <lammich@in.tum.de>; Thu, 12 Jul 2018
+ 16:27:31 +0200 (CEST)
+Received: from BADWLRZ-SWMBX07.ads.mwn.de (2001:4ca0:0:108::163) by
+ BADWLRZ-SWMBX07.ads.mwn.de (2001:4ca0:0:108::163) with Microsoft SMTP
+ Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256)
+ id 15.1.1531.3; Thu, 12 Jul 2018 16:27:30 +0200
+Received: from BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70]) by
+ BADWLRZ-SWMBX07.ads.mwn.de ([fe80::302d:9066:578c:4d70%13]) with mapi id
+ 15.01.1531.003; Thu, 12 Jul 2018 16:27:30 +0200
+From: "Putwattana, Attakorn" <a.putwattana@tum.de>
+To: "lammich@in.tum.de" <lammich@in.tum.de>
+Subject: [FDS] Project
+Thread-Topic: [FDS] Project
+Thread-Index: AQHUGdxfwWbWujLDCkuYJzKQDdGSoA==
+Date: Thu, 12 Jul 2018 14:27:30 +0000
+Message-ID: <971b4b11a63045349e63b8e0c4136bf4@tum.de>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Exchange-Organization-AuthAs: Internal
+X-MS-Exchange-Organization-AuthMechanism: 04
+X-MS-Exchange-Organization-AuthSource: BADWLRZ-SWMBX07.ads.mwn.de
+X-MS-Has-Attach: yes
+X-MS-TNEF-Correlator: 
+x-originating-ip: [95.157.24.178]
+Content-Type: multipart/mixed; boundary="_004_971b4b11a63045349e63b8e0c4136bf4tumde_"
+MIME-Version: 1.0
+X-Evolution-Source: 1479990504.8344.16@lapnipkow10
+
+
+--_004_971b4b11a63045349e63b8e0c4136bf4tumde_
+Content-Type: multipart/alternative; boundary="_000_971b4b11a63045349e63b8e0c4136bf4tumde_"
+
+
+--_000_971b4b11a63045349e63b8e0c4136bf4tumde_
+Content-Type: text/plain; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+Dear Dr. Peter Lammich,
+
+
+This is my "Fenwick tree" project.  Thank you for your support and suggestion for this project.
+
+
+Best regards,
+
+Attakorn Putwattana
+
+
+--_000_971b4b11a63045349e63b8e0c4136bf4tumde_
+Content-Type: text/html; charset="iso-8859-1"
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
+</head>
+<body dir="ltr">
+<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
+<p></p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+Dear Dr. Peter Lammich,</p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+<br>
+</p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+This is my <span style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+&quot;Fenwick tree&quot;&nbsp;</span>project.&nbsp; Thank you for your support and suggestion for this project.</p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+<br>
+</p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+Best regards,</p>
+<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
+Attakorn Putwattana</p>
+<br>
+<p></p>
+</div>
+</body>
+</html>
+
+--_000_971b4b11a63045349e63b8e0c4136bf4tumde_--
+
+--_004_971b4b11a63045349e63b8e0c4136bf4tumde_
+Content-Type: application/octet-stream; name="Fenwick_Trees_List.thy"
+Content-Description: Fenwick_Trees_List.thy
+Content-Disposition: attachment; filename="Fenwick_Trees_List.thy"; size=27027; creation-date="Thu, 12 Jul 2018 14:27:07 GMT"; modification-date="Thu, 12 Jul 2018 14:27:07 GMT"
+Content-Transfer-Encoding: base64
+
+KCoKICBBdXRob3I6IEF0dGFrb3JuIFB1dHdhdHRhbmEKKikKCnRoZW9yeSBGZW53aWNrX1RyZWVz
+X0xpc3QKCmltcG9ydHMKICBDb21wbGV4X01haW4KICBPcmRlcmluZ3MKYmVnaW4KCnRleHQgeyoK
+ICBUaGlzIHRoZW9yeSBpbXBsZW1lbnRlZCBGZW53aWNrIHRyZWUgKGh0dHBzOi8vZW4ud2lraXBl
+ZGlhLm9yZy93aWtpL0ZlbndpY2tfdHJlZSkKICB1c2luZyBsaXN0IGFuZCBwcm92ZXMgc29tZSBv
+ZiBpdHMgcHJvcGVydGllcy4gIEZlbndpY2sgdHJlZSBpcyB1c2VkIHRvIGltcGxlbWVudAogIGN1
+bXVsYXRpdmUgZnJlcXVlbmN5IHRhYmxlcy4gIE5vdGUgdGhhdCB0aGlzIGltcGxlbWVudGF0aW9u
+IGlnbm9yZXMgdGhlIGZyZXF1ZW5jeSAKICBvZiBpbmRleCAwLCBlLmcuLCBjb25zaWRlciBvbmx5
+IGZyZXF1ZW5jeSBvZiBpbmRleGVzIGJldHdlZW4gMSBhbmQgbi4KCiAgRXhhbXBsZTogZnJlcXVl
+bmN5IGFuZCBjdW11bGF0aXZlIGZyZXF1ZW5jeSBvZiBrZXk6CiAgICAgICAgICAgICAgICAgICAg
+ICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogICAgICAgICAgICAgICAgICAg
+ICAgfCBrZXkgfCBmcmVxLiAgfCBjdW11bGF0aXZlIGZyZXEuIHwKICAgICAgICAgICAgICAgICAg
+ICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAgICAgICAgICAgICAgICAg
+ICAgICB8ICAxICB8ICAgIDAgICB8ICAgICAgICAgMCAgICAgICAgfAogICAgICAgICAgICAgICAg
+ICAgICAgfCAgMiAgfCAgICA2ICAgfCAgICAgICAgIDYgICAgICAgIHwKICAgICAgICAgICAgICAg
+ICAgICAgIHwgIDMgIHwgICAgMCAgIHwgICAgICAgICA2ICAgICAgICB8CiAgICAgICAgICAgICAg
+ICAgICAgICB8ICA0ICB8ICAgIDEgICB8ICAgICAgICAgNyAgICAgICAgfAogICAgICAgICAgICAg
+ICAgICAgICAgfCAgNSAgfCAgICAyICAgfCAgICAgICAgIDkgICAgICAgIHwKICAgICAgICAgICAg
+ICAgICAgICAgIHwgIDYgIHwgICAgMyAgIHwgICAgICAgIDEyICAgICAgICB8CiAgICAgICAgICAg
+ICAgICAgICAgICB8ICA3ICB8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