Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
teaching:cc4101:tareas:2015-2:tarea2 [2015/10/10 16:13] – [(1.3) Optimización] racruz | teaching:cc4101:tareas:2015-2:tarea2 [2015/10/13 09:45] – [(3.0) Interpretación sobre conjuntos finitos] racruz | ||
---|---|---|---|
Line 21: | Line 21: | ||
<code scheme> | <code scheme> | ||
- | (<=> (=> p q) (or (¬ p) q)) | + | (<=> (=> p q) (or (not p) q)) |
</ | </ | ||
Line 30: | Line 30: | ||
<code scheme> | <code scheme> | ||
- | (<=> (=> p q) (or p (¬ q))) | + | (<=> (=> p q) (or p (not q))) |
</ | </ | ||
Line 143: | Line 143: | ||
;Edit: (list (num 2) (num 4)) por: | ;Edit: (list (num 2) (num 4)) por: | ||
(list 2 4) | (list 2 4) | ||
- | </ | + | </ |
- (0.5) Defina la función '' | - (0.5) Defina la función '' | ||
> (satisfiable? | > (satisfiable? | ||
#t | #t | ||
- | > (satisfiable? | + | > (satisfiable? |
#f | #f | ||
> (satisfiable? | > (satisfiable? | ||
#t | #t | ||
- | > (satisfiable? | + | > (satisfiable? |
#f | #f | ||
</ | </ | ||
Line 166: | Line 166: | ||
* ¬¬p <=> p | * ¬¬p <=> p | ||
Con esto se puede asegurar que en un programa válido, después de las negaciones ¬ no aparecen las expresiones: | Con esto se puede asegurar que en un programa válido, después de las negaciones ¬ no aparecen las expresiones: | ||
- | > (simplify-negations (parse-expr '(¬ (or (¬ p) (¬ q))))) | + | > (simplify-negations (parse-expr '(not (or (not p) (not q))))) |
(my-and (id 'p) (id 'q)) | (my-and (id 'p) (id 'q)) | ||
- | > (simplify-negations (parse-expr '(¬ (¬ (¬ (or p q)))))) | + | > (simplify-negations (parse-expr '(not (not (not (or p q)))))) |
(my-and (my-not (id 'p)) (my-not (id 'q))) | (my-and (my-not (id 'p)) (my-not (id 'q))) | ||
</ | </ |