upd
This commit is contained in:
1
logic/.obsidian/app.json
vendored
Normal file
1
logic/.obsidian/app.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
logic/.obsidian/appearance.json
vendored
Normal file
1
logic/.obsidian/appearance.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
33
logic/.obsidian/core-plugins.json
vendored
Normal file
33
logic/.obsidian/core-plugins.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"footnotes": false,
|
||||
"properties": true,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": true,
|
||||
"bases": true,
|
||||
"webviewer": false
|
||||
}
|
||||
192
logic/.obsidian/workspace.json
vendored
Normal file
192
logic/.obsidian/workspace.json
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "edb1ebea8169bc3e",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "724d0ad68d510d57",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "fe1e81558756c09c",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "pdf",
|
||||
"state": {
|
||||
"file": "notes.pdf"
|
||||
},
|
||||
"icon": "lucide-file-text",
|
||||
"title": "notes"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "4768e79537592808",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "259febbe7265eb85",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "4250c63d8e6ee2c8",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "Files"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c38c35baa9c86283",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "Search"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a3b3f8582066ac3c",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "Bookmarks"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300,
|
||||
"collapsed": true
|
||||
},
|
||||
"right": {
|
||||
"id": "4fe371b26b7fbd49",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "a27e629e16416754",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "2ac4dce4aeb43cbe",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "notes.pdf",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Backlinks for notes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "57570db4194fbe9d",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "notes.pdf",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "Outgoing links from notes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "0736655696eeb3bb",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "Tags"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "268a0417d71d91e3",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "All properties"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "12358fc23750235e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "notes.pdf",
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "Outline of notes"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300,
|
||||
"collapsed": true
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:Open quick switcher": false,
|
||||
"graph:Open graph view": false,
|
||||
"canvas:Create new canvas": false,
|
||||
"daily-notes:Open today's daily note": false,
|
||||
"templates:Insert template": false,
|
||||
"command-palette:Open command palette": false,
|
||||
"bases:Create new base": false
|
||||
}
|
||||
},
|
||||
"active": "fe1e81558756c09c",
|
||||
"lastOpenFiles": [
|
||||
"notes.typ~",
|
||||
"4.py~",
|
||||
"4.py",
|
||||
"notes.typ"
|
||||
]
|
||||
}
|
||||
15
logic/4.py
Normal file
15
logic/4.py
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
def f4(a, b):
|
||||
return ((a <= b) and b) <= a
|
||||
|
||||
|
||||
def main():
|
||||
print("a, b, f(a, b)")
|
||||
for a in [0, 1]:
|
||||
for b in [0, 1]:
|
||||
print(a, b, int(f4(a, b)))
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
5615
logic/notes.pdf
5615
logic/notes.pdf
File diff suppressed because it is too large
Load Diff
259
logic/notes.typ
Normal file
259
logic/notes.typ
Normal file
@@ -0,0 +1,259 @@
|
||||
#set text(size: 1.5em, font: "Maple Mono")
|
||||
|
||||
|
||||
0. отрицание - $not$
|
||||
1. сильная дизъюнкция - $eq.triple.not " или " or.double$
|
||||
2. конъюнкция - $and$
|
||||
3. дизъюнкция - $or$
|
||||
4. эквивалентность - $eq.triple$
|
||||
5. импликация - $arrow " или " subset$
|
||||
|
||||
$
|
||||
1 and 0 eq 0
|
||||
$
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$a and b$][0][0][0][0][1][0][1][0][0][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $and$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$a or b$][0][0][0][0][1][1][1][0][1][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $or$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$a eq.triple b$][0][0][1][0][1][0][1][0][0][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $eq.triple$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$a arrow.double.not b$][0][0][0][0][1][1][1][0][1][1][1][0],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $arrow.double.not$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$a arrow b$][0][0][1][0][1][1][1][0][0][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $arrow$.]
|
||||
)
|
||||
]
|
||||
|
||||
=== Задачи
|
||||
|
||||
Пусть $a eq 1, b eq 0, c eq 1, d eq 0$
|
||||
|
||||
$
|
||||
a and b eq 0 \
|
||||
a or b and c eq 1 \
|
||||
a eq.triple b eq 0 \
|
||||
a xor b eq 1 \
|
||||
a arrow b eq 0 \
|
||||
(a and b) or c eq 1 \
|
||||
a xor (b or c) eq 1 \
|
||||
(a arrow b) eq.triple c eq 0 \
|
||||
(a and c) arrow (b xor c) eq 1 \
|
||||
((a xor b) and (c arrow d)) or (a eq.triple d) eq 0 \
|
||||
a and b eq.triple c eq 0 \
|
||||
a or b xor c eq 1
|
||||
$
|
||||
|
||||
=== Законы
|
||||
|
||||
|
||||
Закон двойного отрицания
|
||||
$
|
||||
not (not A) eq A \
|
||||
$
|
||||
|
||||
Закон идемпотентности
|
||||
$
|
||||
A or A eq A \
|
||||
A and A eq A \
|
||||
$
|
||||
|
||||
Закон коммутативности
|
||||
$
|
||||
A or B eq B or A \
|
||||
A and B eq B and A
|
||||
$
|
||||
|
||||
Нейтральные элементы
|
||||
$
|
||||
A and 1 eq A \
|
||||
A or 0 eq A
|
||||
$
|
||||
|
||||
Абсорбирующие элементы
|
||||
$
|
||||
A and 0 eq 0 \
|
||||
A or 1 eq 1
|
||||
$
|
||||
|
||||
Законы отрицания
|
||||
$
|
||||
A and not A eq ? \
|
||||
A or not A eq ?
|
||||
$
|
||||
|
||||
=== Еще примеры
|
||||
|
||||
$
|
||||
A or (A and B) eq A
|
||||
|
||||
/*
|
||||
A and (A or B)
|
||||
|
||||
A or ¬A
|
||||
|
||||
A and ¬A
|
||||
|
||||
¬(¬A)
|
||||
|
||||
(A or B) and A
|
||||
|
||||
A or (B or A)
|
||||
|
||||
(A and B) or B eq ?
|
||||
*/
|
||||
$
|
||||
|
||||
Составить таблицы истинности для следующих функций:
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$((a arrow b) and b) arrow a$][0][0][1][0][1][0][1][0][1][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $((a arrow b) and b) arrow a$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$a$][$A or (not A)$][0][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $A or (not A)$.]
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$a$][$not (not A arrow.l.r A)$][0][0][1][0],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $not (not A arrow.l.r A)$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$p$][$p and (not p)$][0][0][1][0],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $p and (not p)$.]
|
||||
)
|
||||
]
|
||||
|
||||
Задание 3.
|
||||
|
||||
$
|
||||
C eq 0 \
|
||||
A or B or C eq A or B or 0 eq A or B eq 1 arrow.double A eq 1 " или " B eq 1 \
|
||||
A arrow (D or not D) eq A arrow 0 eq 1 arrow.double A eq 0 \
|
||||
B arrow (E and not E) eq B arrow 0 eq 1 arrow.double B eq 0 \
|
||||
A eq 1 " или " B eq 1, space.quad A eq 0 " и " B eq 0 arrow.double "противоречие" arrow.double C eq 1
|
||||
$
|
||||
|
||||
|
||||
|
||||
|
||||
=== Вариант 2
|
||||
|
||||
Пусть $A$ - ложь (0), $B$ - истина (1).
|
||||
|
||||
$
|
||||
A arrow B eq 1
|
||||
B arrow A eq 0
|
||||
not A arrow B eq 1
|
||||
not B arrow A eq 1
|
||||
not B arrow not A eq 1
|
||||
not A arrow not B eq 0
|
||||
$
|
||||
|
||||
Пусть $P eq 1, Q eq 0, R eq 0, S eq 1$:
|
||||
|
||||
$
|
||||
R and S arrow (R arrow not Q or S) \
|
||||
0 and 1 arrow (0 arrow 1 or 1) \
|
||||
0 arrow (0 arrow 1) \
|
||||
0 arrow 1 \
|
||||
1
|
||||
$
|
||||
|
||||
$
|
||||
P or R eq.triple R and not S \
|
||||
1 or 0 eq.triple 0 and not 1 \
|
||||
1 or 0 eq.triple 0 and 0 \
|
||||
1 eq.triple 0 \
|
||||
0
|
||||
$
|
||||
|
||||
Составить таблицы истинности для следующих функций:
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$P$][$(P arrow not P) and (not P arrow P)$][0][0][1][0],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $(P arrow not P) and (not P arrow P)$.]
|
||||
)
|
||||
]
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 3)[$a$][$b$][$A and (A or B) eq.triple A $][0][0][1][0][1][1][1][0][1][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $A and (A or B) eq.triple A $.]
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$p$][$p or (not p)$][0][1][1][1],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $p or (not p)$.]
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
||||
#align(center)[
|
||||
#figure(
|
||||
table(columns: 2)[$p$][$p and (not p)$][0][0][1][0],
|
||||
supplement: [Табл.],
|
||||
caption: [Таблица истинности для $p and (not p)$.]
|
||||
)
|
||||
]
|
||||
|
||||
Задание 3
|
||||
|
||||
$
|
||||
not Q and R eq 1 arrow.double Q eq 0 \
|
||||
P arrow Q eq 1 arrow.double P arrow 0 eq 1 arrow.double P eq 0 \
|
||||
P eq 0
|
||||
$
|
||||
Reference in New Issue
Block a user