From 390e6e5f265205b563c4faf0115b1e1b6aad2063 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 4 Oct 2023 11:26:19 +0200 Subject: [PATCH] vault backup: 2023-10-04 11:26:19 --- .obsidian/workspace.json | 2 +- Algo/CM/CM du 04 octobre.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 3917f7a..7dae3ea 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -158,6 +158,7 @@ }, "active": "325e43e04f9c035d", "lastOpenFiles": [ + "Algo/CM/CM du 27 septembre.md", "Algo/CM/CM du 04 octobre.md", "Algo/Séminaire/Remediation.md", "Algo/Courses/Chapter 6 - Lists.md", @@ -168,7 +169,6 @@ "Algo/Séminaire/Exercices seminaire.md", "Algo/Séminaire/Chapter 3 - Case analysis.md", "Algo/Courses", - "Algo/CM/CM du 27 septembre.md", "Algo/Séminaire/Chapter 5 - Recursivity.md", "COM-ADMR/Séjour international EPITA.md", "Algo/CM", diff --git a/Algo/CM/CM du 04 octobre.md b/Algo/CM/CM du 04 octobre.md index e69de29..4161656 100644 --- a/Algo/CM/CM du 04 octobre.md +++ b/Algo/CM/CM du 04 octobre.md @@ -0,0 +1,19 @@ +An abstract type have a signature, which contains types, uses and operations, and have some axioms. + +An axiom let us determine the value of the application of the observers with the internal operations (in the example below, the operation modify). An axiom must be precise. + +``` +Types + vector +Uses + integer, element +Operations + Modify : vector x integer x element -> vector /*internal operation*/ + Nth: vector x integer -> element /* Observers */ + Lowerlimit: vector -> integer /* Observers */ + Upperlimit: vector -> integer /* Observers */ + +Axioms + lowerlimit(v) =< i =< upperlimit(v) -> nth(modify(v,i,e), i) = e +``` +In this example, the axiom explain that it check nth position in the modified vector