1.1. Core doctrines in human pathology, reflected in:1.1.1. Consensus conference proceedings (Kao, 2004; Epstein, 1998).1.2. Organized as hierarchical lists.
1.1.2. Review texts. (Sinard; Haber, 2000).
1.1.3. Specialty Texts (Bostwick; Miettinnen).
1.1.4. Tumor staging manuals (AJCC).
1.1.5. Tumor classifications (Berman, 2004).
1.1.6. Pathology reporting protocols. (CAP; ADASP).
1.1.7. Continuing Medical Education (Checkpath).
1.3. Transferred to commercial spreadsheet programs (Excel VBA).
1.4. Displayed as rectangular tables. Analyzed with statistical tests.
1.5. Mathematical model and computer script (Excel VBA).
1.6. Nandset computing method: finds all solutions (mathematical completeness).
1.7. Determines the logical consistency of lists.
1.8. Computability in polynomial computing resources.
1.9. Modal logic theory of ethical data collection (Moore, 2003).
1.10. Classical logic has no ordering concept: a statement is either true or false or unknown.
1.11. Bayesian logic has too much ordering: exact probability numbers are required, and subject to arithmetic operations, often unjustified.
1.12. Order logic is ordinal only.
2.1 Zermelo-Frankel Set Theory. (Kleene; Suppes).C= is a member of.
{} = Ø = empty set.
U = set-union.
/\ =set-intersection.
- = set-subtraction.
c = subset.
2.2 Commercial spreadsheet application. Microsoft® Excel®. (Visual Basic for Applications, Excel 2000).
2.3 Embedded programming language. Microsoft® Visual Basic® for Applications. (Visual Basic for Applications, Excel 2000).
2.4 Perl programming language. (Perl).
3.1. Spreadsheet, Ш: collection of sheets, or folios. Each folio: rectangular table; rows, columns, cells.
3.2. Patient-folio, П: individual patient data.
3.3. Disease-folio, Д: logic of disease.
3.4. Combined-folio, Ш = (П U Д).
4.1. Patient-folio, П:4.1.1. Observed and inferred statements for each patient.4.2. Disease-folio, Д:
4.1.2. Quantitative, interval, ranked, categorical, and binary data allowed.
4.1.3. All data expressed as true, false, or missing-value statements.
4.1.4. Example:4.1.5. That is: Mary -> İ; Mary -> ♀; Mary -> ~♂; Bill -> İ, etc.
П İ ♀ ♂ Mary +İ +♀ ~♂ Bill +İ ~♀ +♂ Pat +İ +♀ . 4.2.1. Topmost-leftmost cell: origin, İ[0], true for all patients.
4.2.2. Every filled-in cell: parent-concept, child-concept, or both.
4.2.3. Every parent-concept has one-or-more children-concepts.
4.2.4. First child-concept, one-step-down-one-step-right from its parent-concept.
4.2.4. Subsequent children of same parent, same column as siblings.
4.2.5. Each parent-cell and its parent-cells implies the inclusive-or of its children-cells.
4.2.6. Example:
Д 0 1 2 1 +İ . . 2 . +♀ . 3 . . ~♂ 4 . +♂ . 5 . . ~♀
4.2.7. That is: İ -> (♀ | ♂); İ & ♀ -> ~♂; İ & ♂ -> ~♀.
4.3. Combined-folio, Ш:
4.3.1. Example:
Ш 0 1 2 3 1 Mary . . . 2 . +İ . . 3 . . +♀ . 4 . . . ~♂ 5 Bill . . . 6 . +İ . . 7 . . +♂ . 8 . . . ~♀ 9 Pat . . . 10 . +İ . . 11 . . +♀ . 12 +İ . . . 13 . +♀ . . 14 . . ~♂ . 15 . +♂ . . 16 . . ~♀ .
5.1. SPREADSHEET-REPRESENTATION. Rectangular tables constructed according to the above rules:
Advantage: Easy-to-read.
Examples:
П İ ♀ ♂ Mary +İ +♀ ~♂ Bill +İ ~♀ +♂ Pat +İ +♀ .
Д 0 1 2 1 +İ . . 2 . +♀ . 3 . . ~♂ 4 . +♂ . 5 . . ~♀
5.2. SYMBOLIC-LOGIC-REPRESENTATION. Set of statements of the form: it is true that X; or X implies Y; or X and Y; or X inclusive-or Y; or not-x; where x and y are true-false statements.
Advantage: Traditional logic notation.
Examples:Mary -> İ.
Mary -> ♀.
Mary -> ~♂.
Bill -> İ.
Bill -> ♂.
Bill -> ~♀.
Pat -> İ.
Pat -> ♀.
İ -> (♀ | ♂).
İ & ♀ -> ~♂.
İ & ♂ -> ~♀.
5.3. NANDSET-REPRESENTATION. Collection of sets of the form: {X, Y, Z,...}, where not all of X, Y, Z,... are true at once.
Advantage: Transparent calculations, i.e., X [+] Y = Z, nandset addition, where X={a, b, ...}, Y={~a, c, ,,,}, and Z={b, c, ...}. Nandset addition, performed exhaustively, completely and consistently defines the system, and may be performed exhaustively after polynomial steps in a suitably constrained system (i.e., not an exponential number of logic expressions). For nandset, X, that belongs to either П or Д and anonymous completely described patient, A, then X is NOT a subset of A.
See: http://www.netautopsy.org/modlthry.htm
Examples:1. {Mary, ~İ}.Note that nandsets 10 and 11 are redundant (i.e., Zermelo-Frankel sets are order-insensitive).
2. {Mary, ~♀}.
3. {Mary, +♂}.
4. {Bill, ~İ}.
5. {Bill, ~♂}.
6. {Bill, +♀}.
7. {Pat, ~İ}.
8. {Pat, ~♀}.
9. {İ, ~♀, ~♂}.
10. {İ, +♀, +♂}.
11. {İ, +♂, +♀}.
Sample calculation:{Pat, ~İ} [+] {İ, +♀, +♂} = {Pat, +♀, +♂}.
{Pat, ~♀} [+] {Pat, +♀, +♂} = {Pat, +♂}
Therefore, one concludes that Pat is not-male.
6.1. ATOMSET of distinct statements (atoms, A), each with definite true-false status.
6.2. Each atom, aCA, is either a unique PATIENT-IDENTIFIER, a DATUM, or a MEDICAL-ENTITY, i.e., A = (P U D U E), (P /\ D) = Ø, (P /\ E) = Ø, (D /\ E) = Ø.
6.3. No self-reference paradoxes, e.g., no patient can be named, "I am not a patient".
6.4. Special medical-entity: İMPORTANCE, İ[0]. Every patient is important.
6.5. A patient-atom has no negation.
6.6. Each non-patient atom, aC(A-P), has an EXACT NEGATION, ~aC(A-P).
6.7. Set of anonymous completely-described patients, Ю. For every UCЮ:6.7.1. U c (A-P).
6.7.2. For every UCЮ and ukCU, ~uk ~CU.
6.7.3. For every u=(u1,...,uЛ)CU, there exists a unique INFLECTION POINT, I, at which:6.7.3.1. For 0< j < I, uj/uЛ = -1; and
6.7.3.2. For I < k < Л, uk/uI = +1.
6.8. Example. Two-level division of female/male, Л = 2, T -> (♂1 | ♀2).
Ю T0 ♀1 ♀2 ♂1 ♂2 Description 1 ~ + + ~ ~ Usual female non-teamster. 2 ~ + ~ ~ + Weak female non-teamster. 3 ~ ~ ~ + + Usual male non-teamster. 4 ~ ~ + + ~ Weak male teamster. 5 + + + ~ ~ Usual female non-teamster. 6 + + ~ ~ + Weak female teamster. 7 + ~ ~ + + Usual male teamster. 8 + ~ + + ~ Weak male teamster.
6.9. Example. Three-level division of female/male, Л = 3, T -> (♂1 | ♀3).
Ю T0 ♀1 ♀2 ♀3 ♂1 ♂2 ♂3 Description 1 ~ + + + ~ ~ ~ Usual female non-teamster. 2 ~ + + ~ ~ ~ + Weaker female non-teamster. 3 ~ + ~ ~ ~ + + Weakest female non-teamster. 4 ~ ~ ~ ~ + + + Usual male non-teamster. 5 ~ ~ ~ + + + ~ Weaker male non-teamster. 6 ~ ~ + + + ~ ~ Weakest male non-teamster. 7 + + + + ~ ~ ~ Usual female teamster. 8 + + + ~ ~ ~ + Weaker female teamster. 9 + + ~ ~ ~ + + Weakest female teamster. 10 + ~ ~ ~ + + + Usual male teamster. 11 + ~ ~ + + + ~ Weaker male teamster. 12 + ~ + + + ~ ~ Weakest male teamster.
6.10. Example. Three-level division of active colitis.
Ю Fam Hx
Crohn's.Hx Foreign
Travel.Ulcerative
colitis1Ulcerative
colitis2Ulcerative
colitis3Crohn's
colitis1Crohn's
colitis2Crohn's
colitis3Infectious
colitis1Infectious
colitis2Infectious
colitis31 + ~ + ~ ~ + + ~ + ~ ~ 2 ~ + + ~ ~ + ~ ~ + + ~ 3 + + + ~ ~ + ± ~ + ± ~
7.1. NOTATION: {X[i]} = {xi}. {X[i} = {xi, xi+1, ..., xЛ}. {Xi]} = {x0, x1, ..., xi}.In this table, all males but only usual females take a job as a teamster, i.e., male teamsters (lines 4,5,6) are much more frequent than female teamsters (line 1).
7.2. Classical-logic:
Every (important) patient, İ, is either a female, ♀, or a male, ♂. If a patient is female, then the patient is not-male. If a patient is male, then the patient is not-female.
Д 0 1 2 1 +İ[0] . . 2 . +♀[0] . 3 . . ~♂[0] 4 . +♂[0] . 5 . . ~♀[0]
7.3. Order-logic:Every patient, İ, is either a teamster, T or else not-a-teamster, ~T. Among teamsters, males are more frequent than females.The nandsets are:
Д 0 1 2 1 +İ[0] . . 2 . ~T[0] . 3 . . ♀[1 4 . . ♂[2 5 . T[0] . 6 . . ♂[1 7 . . ♀[2 {+i0, +t0, ~t0}.
{+i0, ~t0, ~♀1, ~♂2}.
{+i0, ~t0, ~♀2, ~♂2} (vacuous).
{+i0, +t0, ~♂1, ~♀2}.
{+i0, +t0, ~♂2, ~♀2} (vacuous).
That is, a patient is either a teamster or not; among non-teamsters, females are more frequent than males; and among teamsters, males are more frequent than females.
7.4. Subset table of anonymous completely-described patients, teamsters only, Л=2, T -> (♂1 | ♀2).In this table, all males but only usual females take a job as a teamster, i.e., male teamsters (lines 2,3) are more frequent than female teamsters (line 1).
Ю T0 ♀1 ♀2 ♂1 ♂2 Description Status 1 + + + ~ ~ Usual female teamster. OK 2 + + ~ ~ + Weak female teamster.Excluded 3 + ~ ~ + + Usual male teamster. OK 4 + ~ + + ~ Weak male teamster. OK
7.5. Subset table of anonymous completely-described patients, teamsters only, Л=3, T -> (♂1 | ♀3):
Ю T0 ♀1 ♀2 ♀3 ♂1 ♂2 ♂3 Description 1 + + + + ~ ~ ~ Usual female teamster. 2 + + + ~ ~ ~ + Weaker female teamster.3 + + ~ ~ ~ + + Weakest female teamster.4 + ~ ~ ~ + + + Usual male teamster. 5 + ~ ~ + + + ~ Weaker male teamster. 6 + ~ + + + ~ ~ Weakest male teamster.
8.1. THEOREM 1. Classical-logic inclusive-or.
The spreadsheet:is vacuous.
Д 0 1 1 +İ[0] . 2 . +A[0] 3 . ~A[0]
Proof. The only nandset is: {i0, ~a0, +a0}, which is vacuous, since it excludes no anonymous completely-decribed patient.
8.2. THEOREM 2. Classical-logic and.
The spreadsheet:
is contradictory.
Д 0 1 2 1 +İ[0] . . 2 . +A[0] . 3 . . ~A[0]
Proof. The nandsets are: {i0, ~a0} [+] {i0, +a0, +a0} = Ø, which is contradictory, since it excludes all anonymous completely-decribed patients.
8.3. THEOREM 3. Order-logic inclusive-or.
The spreadsheet:
is NOT vacuous.
Д 0 1 1 +İ[0] . 2 . +A[1 3 . ~A[2
Proof. The nandsets are: {+i0, ~a1, +a2} and {+i0, ~a2, +a2}. The first nandset is not vacuous, since it excludes the anonymous completely-decribed patient, {+i0, ~a0, ~a1, +a2}
8.4. THEOREM 4. Order-logic and.
The spreadsheet:is contradictory.
Д 0 1 2 1 +İ[0] . . 2 . +A[1 . 3 . . ~A[2
Proof. The nandsets are: {+i0, ~a1}; {+i0, ~a2}; {+i0, +a1, +a2}; and {+i0, +a2, +a2} = {+i0, +a2}. Then {+i0, ~a2} [+] {+i0, +a2} = Ø, which is contradictory.
Д 0 1 2 3 4 0 +İ0 . . . . 1 . +İ0 . . . 2 . . ♂ . . 3 . . . ~♀ . 4 . . ♀ . . 5 . . . ~♂ . 6 . . . . □4~PRC 7 . +İ0 . . . 8 . . ~□kX . . 9 . . □kX . . 10 . . . □k-1X . 11 . +İ0 . . . 12 . . ~♂ . . 13 . . ♂ . . 14 . . . ~>60Y . 15 . . . >60Y . 16 . . . . □2+PRC 17 . . ♂ . . 18 . . . ~USX . 19 . . . +USX . 20 . . . . □2+PRC 21 . . ♂ . . 22 . . . ~PFX . 23 . . . +PFX . 24 . . . . □4+PRC 25 . . ♂ . . 26 . . . ~□2+PRC . 27 . . . □2+PRC . 28 . . . . #PSA. 29 . . . □3+PRC . 30 . . . . #PBX.
Д 0 1 2 0 +İ . . 1 . ~colitis . 2 . +colitis . 3 . . +infectious colitis. 4 . . +pseudomembranous colitis. 5 . . +radiation colitis. 6 . . +ischemic colitis. 7 . . +microscopic colitis. 8 . . +diversion colitis. 9 . . +self-limited colitis. 10 . . +focal active colitis. 11 . . +inflammatory bowel disease.
Д 0 1 2 3 4 0 +İ . . . . 1 . ~skin. . . . 2 . +skin. . . . 3 . . non-neoplastic dermatoses. . . 4 . . . inflammatory dermatoses. . 5 . . . . acute inflammatory dermatoses. 6 . . . . chronic inflammatory dermatoses. 7 . . . . granulomatous inflammatory dermatoses. 8 . . . . infectious dermatoses. 9 . . . vesiculobullous dermatoses. . 10 . . . follicular dermatoses. . 11 . . . atrophic dermatoses. . 12 . . . connective-tissue dermatoses. . 13 . . . reactive dermatoses. . 14 . . neoplastic dermatoses. . . 15 . . . keratinocytic neoplastic dermatoses. . 16 . . . appendageal neoplastic dermatoses. . 17 . . . fibroblastic neoplastic dermatoses. . 18 . . . melanocytic neoplastic dermatoses. .
Д 0 1 2 3 4 0 +İ . . . . 1 . <Three weeks. . . . 2 . +Three weeks. . . . 3 . . +Amnionic cavity. . . 4 . . +Ectoderm. . . 5 . . . +Lateral ectoderm. . 6 . . . +Neuro-ectoderm. . 7 . . +Mesoderm. . . 7 . . . +Paraxial mesoderm. . 8 . . . +Somite. . 9 . . . +Intermediate mesoderm. . 10 . . . +Lateral plate mesoderm. . 11 . . . . +Somatic mesoderm. 12 . . . . +Splanchnic mesoderm. 13 . . +Entoderm. . . 14 . . +Intra-embryonic Coelom. . . 1 . >Three weeks. . . .
From Dr. Berman's Cancer Classification, based upon the embryologic origin of tumor stem cells.embryonic primitive primitive_differentiating totipotent_or_multipotent_differentiating limited_differentiating germ cell primitive_non_differentiating non_primitive endoderm_or_ectoderm endoderm_or_ectoderm_surface endoderm_or_ectoderm_endocrine endoderm_or_ectoderm_parenchymal odontogenic_epithelium mesoderm mesenchyme connective_tissue muscle fibrous_tissue vascular adipose_tissue bone_cartilage heme_lymphoid non_mesenchymal_mesoderm coelomic coelomic_ductal coelomic_cavities coelomic_gonadal sub_coelomic sub_coelomic_gonadal sub_coelomic_endocrine sub_coelomic_nephric neuroectoderm_neural_plate neural_tube neural_tube_parenchyma neural_tube_lining neural_crest peripheral_nervous_system neural_crest_endocrine neural_crest_melanocytic
Ю 0 1 2 3 4 5 6 0 +İ . . . . . . 1 . +Embryonic. . . . . . 2 . . +Primitive
embryonic.. . . . 3 . . . +Primitive
differentiating
embryonic.. . . 4 . . . . +Totipotent
or_multipotent
primitive
differentiating
embryonic.. . 5 . . . . +Limited
primitive
differentiating
embryonic.. . 6 . . . +Germ_cell
embryonic.. . . 7 . . . +Primitive
non_differentiating
embryonic.. . . 8 . . +Non-primitive
embryonic.. . . . 9 . . . +Endoderm
or_ectoderm.. . . 10 . . . . +Endoderm
or_ectoderm
surface.. . 11 . . . . +Endoderm
or_ectoderm
endocrine.. . 12 . . . . +Endoderm
or_ectoderm
parenchymal.. . 13 . . . . +Odontogenic
epithelium.. . 14 . . . +Mesoderm. . . . 15 . . . . +Mesenchyme. . . 16 . . . . . +Connective
tissue.. 17 . . . . . . +Muscle. 18 . . . . . . +Fibrous_tissue. 19 . . . . . . +Vascular. 20 . . . . . . +Adipose_tissue. 21 . . . . . . +Bone_cartilage. 22 . . . . +Non-mesenchymal
mesoderm.. . 23 . . . . . +Coelomic
mesoderm.. 24 . . . . . . +Coelomic
ductal
mesoderm.25 . . . . . . +Coelomic
cavity
mesoderm.26 . . . . . . +Coelomic
gonadal
mesoderm.27 . . . . . +Subcoelomic
mesoderm.. 28 . . . . . . +Subcoelomic
gonadal
mesoderm.29 . . . . . . +Subcoelomic
endocrine
mesoderm.30 . . . . . . +Subcoelomic
nephric
mesoderm.
13.0. M = highest level of certainty. H = last interval in time.
ÇШ = all true logical consequences of spreadsheet Ш.
çШ = all computed consequences of spreadsheet Ш.
Theorem: çШ = ÇШ.
13.1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.13.1.1. For every +a13.2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.CA, -aCA, -a ~= a, ++a = +a, and --a = +a.
13.1.2. For every +aCA, $ka = $ka; #a=#-a; !a=!-a..13.2.1. ($ka->$k-1a)@Д0.13.3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty.
13.2.2. Nandset definition: {+$ka,-$k-1a}CД0 for every k, 1 < k < M-1 and aCA.13.3.1. ($d->$Md)@Д0.13.4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).
13.3.2. Nandset definition: {$d,-$Md}CД0, for every dCD.13.4.1. (-#d->-!d)@Д0.13.5. Conative rule. Necessary data should be collected if the patient consents (conative).
13.4.2. Nandset definition: {-#d,+!d}CД0, for dCD.13.5.1. ((-$d&#d)->!d)@Д0.13.6. Vexative rule. Data or demanded in order of medical need.
13.5.2. Nandset definition: {-$d,+#d,-!d}CД0, for dCD.13.6.1. keð..d-vexative: (□ke&□kð, ...,&-$d)->(#d| □k+1-e) @ Д0.13.7. Ontology rule. Necessary data increase one's certainty of medical entities.
13.6.2. Nandset definition: {+$ke,e,+$kð,ð,..,-$d,-#d, -$k+1e}CД0, for 1 < k < M-2, ðCD, and eCE.13.7.1. (□kð..)-> (□ke|□k+1-e) @ Д0, 1<k<M-2.13.8. Ethical data collection rule. All ethical data are either positive, negative, failed-attempt, or not-attempted.
What is □M-e?
Or, more interestingly, what is □∞-e?
13.7.2. Nandset definition: {+$kð,ð,..,-e,-$k+1e}CД0, for 1 < k < M-2, dCD, ð c (D - {+d,-d}).13.8.0. If d is d-Hippocratic, then there exists at most one I, 1 < I < H, such that:13.9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.
13.8.1. (POS-DATA): +$d, +d, +!d true for ДI, xor
13.8.2. (NEG-DATA): +$d, -d, +!d true for ДI, xor
13.8.3. (FAIL-DATA): -$d, +!d true for ДI, xor
13.8.4. (NOTRY-DATA): -$d, +$d, -#d, +#d, -!d, +!d not true for ДI.13.9.1. It is true that -$ka @ CI if and only if it is not true that $ka @ ÇДI
13.9.2. Nandset definition: {$ka}CCI if and only if {-$ka} ~CÇДI, for 1 < I < H, 1 < k < M, and aCA.
Evidence-based statistical measures for order-logic.
14.1. A 2×2 CONTINGENCY TABLE is a rectangular table in which one binary factor (example: sex, ♀ vs. ♂) is compared to a second binary factor (example: teamster, ~T vs. T):
Д ♀ ♂ . ~T a b v +T c d w . x y z
14.2. Now suppose that 250 female employees and 250 male employees from a particular shipping company are surveyed, and the OBSERVED VALUES for totals, are as follows:Is the result statistically significant? That is, are there disproportionately more male-teamsters than female-teamsters?
Д ♀ ♂ . ~T 245 205 450 +T 5 45 50 . 250 250 500
14.3. The raw-data values, 245=a, 205=b, 5=c, 45=d, are the cell-totals. The row-sum values, 245+205=450=v and 5+45=50=w are the row-totals. The column-sum values, 245+5=250=x and 205+45=250=y are the column-totals. The sum of all cell-totals, which equals the the sum of the row-totals, as well as the sum of the column-totals, is the grand-total, a+b+c+d=v+w=x+y=z.
14.4. The usual statistical analysis procedures are: the X2 test and the Fisher exact test. In these tests, we obtain EXPECTED VALUES for totals, as follows:where V=v; W=w; X=x; Y=y; and Z=z (i.e., marginal and grand totals are equal to observed); and A=(V×X)/Z; B=(V×Y)/Z; C=(W×X)/Z; and D=(W×Y)/Z. For the example: A=225, B=225, C=25, D=25, V=450, U=50, W=50, Z=500.
Д ♀ ♂ . ~T A B V +T C D W . X Y Z
14.5. In the TOKEN SWAP TEST, one starts with the expected value of, say, the upper left cell, A, and adds (or subtracts) tokens from A, one by one, until A -> A=1 -> A+2 -> -> a, in a manner that the marginal totals remain constant. That is, if A -> A+1, then B -> B-1, C -> C-1, D -> D+1, so that V = (A+1)+(B-1) = v, W = (C-1)+(D+1) = w, X = (A+1)+(C-1) = x, and Y = (B-1)+(D+1) = y, Thus, in general, if A -> -> A+q, then B -> B-q, C -> C-q, and D -> D+q.
14.6. When A+q -> A+q+1, then there are B-q tokens that may be drawn from the upper right cell and D-q tokens that may be drawn from the lower left cell. But when A+q -> A+q-1, B-q+1 tokens that may be drawn from the upper right cell and D-q+1 tokens that may be drawn from the lower left cell. Thus there are ... swaps that increase A+q to A+q+1, and ... swaps that decrease A+q to A+q-1. This generates a token swap distribution.....
14.7. The superiority of the token swap test over traditional contingency table analysis is that one can initialized the expected values at A+Q, ... , based upon your medical experience, where max(-A,-D) < Q < min(B,C). For example, if one expects that male teamsters would be twice as numerous as female teamsters, then one could force 2×C = D, and solve for Q. In traditional analyses, Q is required to be zero.
14.8. In this report, we suggest that the token swap test is a more appropriate analysis, since the expected values of the cell-totals are not preset by statistical theory, but can be manipulated according to medical experience.
15.1. Two intellectual pillars of anatomic pathology informatics: image-recognition; concept-management.
15.2. Concepts in in descending order of importance on spreadsheet.
15.3. Syllogistic quality of reasoning in anatomic pathology.
15.4. Some statements with greater weight than others.
15.5. Formalism is ordinal, not cardinal,
15.6. Stepwise character of medical intentions and therapies.
15.7. Reduces to classical symbolic logic if all superscripts are zero.
15.8. Supports theories of ethical data collection and contingency table analysis.
15.9. Mathematical theories can organize medical knowledge and patient data.
15.10. Can enhance clinicopathologic data collection and surveillance.
| П | . | . |
|---|---|---|
| . | Bill | ♂ |
| П | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 1 | Mary | +İ | +♀ | ~♂ |
| 2 | Bill | +İ | ~♀ | +♂ |
| 3 | Pat | +İ | +♀ | ~♂ |
| 4 | Leslie | +İ | ~♀ | +♂ |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 1 | +İ | . | . |
| 2 | . | +♀ | . |
| 3 | . | . | ~♂ |
| 4 | . | +♂ | . |
| 5 | . | . | ~♀ |
İ implies +♀ or +♂.The three firstborns in this disease-folio, correspond to rows 2, 3, and 5. Each of the implications in the disease-folio corresponds to a unique firstborn:
İ and +♀ implies ~♂.
İ and +♂ implies ~♀.
Row 2: İ implies +♀ or +♂.
Row 3: İ and +♀ implies ~♂.
Row 5: İ and +♂ implies ~♀.
| Ю | 1 | 2 | 3 |
|---|---|---|---|
| 1 | +İ | +♀ | +♂ |
| 2 | +İ | +♀ | ~♂ |
| 3 | +İ | ~♀ | +♂ |
| 4 | +İ | ~♀ | ~♂ |
| 5 | ~İ | +♀ | +♂ |
| 6 | ~İ | +♀ | ~♂ |
| 7 | ~İ | ~♀ | +♂ |
| 8 | ~İ | ~♀ | ~♂ |
Classical-logic:
Every (important) patient, İ, is either a female, ♀, or a male, ♂. If a patient is female, then the patient is not-male. If a patient is male, then the patient is not-female.
Д 0 1 2 1 +İ[0] . . 2 . +♀[0] . 3 . . ~♂[0] 4 . +♂[0] . 5 . . ~♀[0]
Order-logic:Every patient, İ, is either a teamster, T or else not-a-teamster, ~T. Among teamsters, males are more frequent than females.In this table, all males but only usual females take a job as a teamster.The nandsets are:
Д 0 1 2 1 +İ[0] . . 2 . ~T[0] . 3 . . ♀[1 4 . . ♂[2 5 . T[0] . 6 . . ♂[1 7 . . ♀[2 {+i0, +t0, ~t0}.
{+i0, ~t0, ~♀1, ~♂2}.
{+i0, ~t0, ~♀2, ~♂2} (vacuous).
{+i0, +t0, ~♂1, ~♀2}.
{+i0, +t0, ~♂2, ~♀2} (vacuous).
That is, a patient is either a teamster or not; among non-teamsters, females are more frequent than males; and among teamsters, males are more frequent than females.
Subset table of anonymous completely-described patients, teamsters only:
Ю T0 ♀1 ♀2 ♂1 ♂2 Description Status 1 + + + ~ ~ Usual female. OK 2 + + ~ ~ + Weak female.Excluded 3 + ~ ~ + + Usual male. OK 4 + ~ + + ~ Weak male. OK
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ | . |
| 1 | . | +♀ |
| 2 | . | +♂ |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +♀1 |
| 2 | . | +♂2 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ[0] | . | . |
| 1 | . | ~teamster, ~nurse[0] | . |
| 2 | . | . | +♀[1 |
| 3 | . | . | +♂[2 |
| 4 | . | +teamster[0] | . |
| 5 | . | . | +♂[1 |
| 6 | . | . | +♀[2 |
| 7 | . | +nurse.7 | . |
| 8 | . | . | +♀[1 |
| 9 | . | . | +♂[2 |
| Д | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | +İ0 | . | . | . |
| 1 | . | +İ0 | . | . |
| 2 | . | . | non-teamster
non-nurse2. | . |
| 3 | . | . | . | +♀3 |
| 4 | . | . | . | +♂4 |
| 5 | . | . | teamster5. | . |
| 6 | . | . | . | +♂6 |
| 7 | . | . | . | +♀7 |
| 8 | . | . | nurse.8 | . |
| 9 | . | . | . | +♀9 |
| 10 | . | . | . | +♂10 |
| 11 | . | +İ0 | . | . |
| 12 | . | . | +♀1 | . |
| 13 | . | . | . | ~♂1 |
| 14 | . | . | +♂1 | . |
| 15 | . | . | . | ~♀1 |
| Д | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | +İ | . | . | . |
| 1 | . | +P | . | . |
| 2 | . | . | +C1 | . |
| 3 | . | . | . | +G1 |
| 4 | . | . | . | +G2 |
| 5 | . | . | . | +G3 |
| 6 | . | . | . | +G4 |
| 7 | . | . | +C2 | . |
| 8 | . | . | +C3 | . |
| 9 | . | . | +C4 | . |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ | . | . |
| 1 | . | ~AC | . |
| 2 | . | +AC | . |
| 3 | . | . | +UC |
| 4 | . | . | +CD |
| 5 | . | . | +IC |
| Д | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | +İ | . | . | . |
| 1 | . | ~colitis | . | . |
| 2 | . | +colitis | . | . |
| 3 | . | . | +infectious colitis. | . |
| 4 | . | . | +pseudomembranous colitis. | . |
| 5 | . | . | +radiation colitis. | . |
| 6 | . | . | +ischemic colitis. | . |
| 7 | . | . | +microscopic colitis. | . |
| 8 | . | . | . | +lymphocytic colitis. |
| 9 | . | . | . | +collagenous colitis. |
| 10 | . | . | +diversion colitis. | . |
| 11 | . | . | +self-limited colitis. | . |
| 12 | . | . | +focal active colitis. | . |
| 13 | . | . | +inflammatory bowel disease. | . |
| 14 | . | . | . | +ulcerative colitis. |
| 15 | . | . | . | +Crohn's disease. |
İ
~colitis
+colitis.
+infectious colitis.
+pseudomembranous colitis.
+radiation colitis.
+ischemic colitis.
+microscopic colitis.
+lymphocytic colitis.
+collagenous colitis.
+diversion colitis.
+self-limited colitis.
+focal active colitis.
+inflammatory bowel disease.
+ulcerative colitis.
+Crohn's colitis.
+colitis.
infectious colitis.
acute onset.
short duration.
fever.
diarrhea.
crypt abscesses.
goblet cell depletion.
amebic colitis.
amebic colitis.
trophozooites.
Entamoeba histolytica.
typical organisms: 40µm, abundant pink cytoplasm.
ingested erythrocytes.
amebic colitis.
focal ulceration.
patchy ulcers.
cecum.
appendix.
rectosigmoid.
pseudomembranous colitis.
recent antibiotic administration.
diarrhea.
abdominal pain.
pseudomembranes on endoscopy.
radiation colitis.
> 45,000 rads to colon.
acute or chronic inflammation.
diarrhea.
abdominal pain.
dusky mucosa endoscopically.
edema endoscopically.
loss of superficial vascularity endoscopically.
acute phase radiation colitis.
edema.
vascular dilatation.
acute cryptitis.
superficial ulceration.
chronic phase radiation colitis.
stromal fibrosis.
atypical fibroblasts.
thickened subepithelial collagen.
glandular atrophy.
glandular distortion.
vascular fibrosis.
vascular intimal thickening.
enlarged endothelial cells.
ischemic colitis.
elderly patient.
acute onset.
diarrhea.
abdominal pain.
nausea.
vomiting.
hematochezia.
mild ischemic colitis.
superficial hemorrhage.
patchy mucosal necrosis.
dilated vasculature.
regenerating crypts.
severe ischemic colitis.
crypt dropout.
acute inflammation.
acute cryptitis.
coagulative necrosis.
late ischemic colitis.
granulation tissue.
scarring.
microscopic colitis.
microscopic colitis.
watery diarrhea.
normal colonoscopy.
usually ♀.
microscopic colitis.
lymphocytic colitis.
increased chronic inflammation in lamina propria.
>20 intraepithelial lymphocytes per 100 enterocytes.
collagenous colitis.
thickened subepithelial collagen.
feathery strands of collogen between glands.
Paneth cell metaplasia.
mixed inflammation, lamina propria.
patchy denuded epithelium.
naked lamina propria.
diversion colitis.
colon excluded from fecal stream.
prominent lymphoid aggregates.
neutrophils, rare crypt abscess.
normal crypt architecture.
self-limited colitis.
self-limited colitis.
self-limited, short-lived clinical course.
sudden onset, diarrhea, abdominal pain.
self-limited colitis.
acute phase self-limited colitis.
lamina propria hemorrhage, congestion.
detached, necrotic surface epithelium.
prominent acute inflammation, > chronic inflammation.
no crypt distortion.
chronic phase self-limited colitis.
lamina propria fibrosis.
crypt distortion.
focal active colitis.
patchy neutrophilic infiltrates.
without glandular distortion.
without crypt abscesses.
inflammatory bowel disease.
inflammatory bowel disease.
mixed inflammation of lamina propria.
plasma cells reaching to muscularis mucosae.
glandular mucus depletion.
occasional Paneth cell metaplasia.
inflammatory bowel disease.
ulcerative colitis.
dense lymphoplasmacytic and neutrophilic infiltrate.
typically infiltrate limited to mucosa.
typically involves rectum, without skip lesions.
may involve entire colon = pancolitis.
may spill into ileum = backwash ileitis.
irregular areas of ulceration.
surrounding islands of preserved mucosa = pseudopolyps.
normal serosa.
Crohn's colitis.
fissuring.
penetrate muscularis propria.
serosal involvement.
acute inflammation.
granulomas.
patchy transmural chronic inflammation.
intervening normal areas = skip lesions.
♂ = male.Note that if a statement about a patient is necessarily2 true, then the statement is necessarily true; if a statement about a patient is necessarily3 true, then the statement is necessarily2 true; ....
♀ = female.
prc = prostate-cancer.
psa = prostate-specific-antigen.
pfx = pathologic-fracture positive for prostate-cancer.
pbx = prostate-biopsy.
>30 = >30 years old.
>60 = >60 years old.
usx = urinary tract symptoms.
□ = necessarily; □2 = necessarily-necessarily,....
# = intentionally.
| Д | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| 0 | +İ0 | . | . | . | . | . |
| 1 | . | +İ0 | . | . | . | . |
| 2 | . | . | ♂ | . | . | . |
| 3 | . | . | . | ~♀ | . | . |
| 4 | . | . | ♀ | . | . | . |
| 5 | . | . | . | ~♂ | . | . |
| 6 | . | . | . | . | □4~prostate-cancer | . |
| 7 | . | +İ0 | . | . | . | . |
| 8 | . | . | ~□kX | . | . | . |
| 9 | . | . | □kX | . | . | . |
| 10 | . | . | . | □k-1X | . | . |
| 11 | . | +İ0 | . | . | . | . |
| 12 | . | . | ~♂ | . | . | . |
| 13 | . | . | ♂ | . | . | . |
| 14 | . | . | . | ~>60 | . | . |
| 15 | . | . | . | >60 | . | . |
| 16 | . | . | . | . | □2+prostate-cancer | . |
| 17 | . | . | ♂ | . | . | . |
| 18 | . | . | . | ~urinary symptoms | . | . |
| 19 | . | . | . | urinary symptoms | . | . |
| 20 | . | . | . | . | □2+prostate-cancer | . |
| 21 | . | . | ♂ | . | . | . |
| 22 | . | . | . | ~pathologic fracture. | . | . |
| 23 | . | . | . | pathologic fracture. | . | . |
| 24 | . | . | . | . | □4+prostate-cancer | . |
| 25 | . | . | ♂ | . | . | . |
| 26 | . | . | . | ~□2+prostate-cancer | . | . |
| 27 | . | . | . | □2+prostate-cancer. | . | . |
| 28 | . | . | . | . | request serum PSA. | . |
| 29 | . | . | . | □3+prostate-cancer. | . | . |
| 30 | . | . | . | . | request prostate biopsy. | . |
+Carnegie Embryologic Developmental Horizons/Staging
+Stage 1.
+Zygote.
+Stage 2.
+Stage 3.
+Stage 4.
+Stage 5.
+Stage 6.
+Stage 7.
+Stage 8.
+Stage 9.
+Stage 10.
+Stage 11.
+Stage 12.
+Stage 13.
+Stage 14.
+Stage 15.
+Stage 16.
+Stage 17.
+Stage 18.
+Stage 19.
+Stage 20.
+Stage 21.
+Stage 22.
+Stage 23.
~Three weeks.
+Three weeks.
+Amnionic cavity.
+Ectoderm.
+Lateral ectoderm.
+neuro-ectoderm.
+Mesoderm: dorsal-to-ventral.
+Paraxial mesoderm.
+somite.
+Intermediate mesoderm.
+cervical intermediate mesoderm.
+thoracic-lumbar intermediate mesoderm.
+nephrogenic cord.
+excretory urinary system.
+nephrotomes.
+nephric tubular epithelium.
+nephric tubular lumen.
+opening into intra-embryonic coelom.
+lateral plate mesoderm.
+somatic mesoderm.
+Splanchnic mesoderm.
+Entoderm.
+Intra-embryonic coelom.
| Д | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | +İ | . | . | . | . |
| 1 | . | ~skin. | . | . | . |
| 2 | . | +skin. | . | . | . |
| 3 | . | . | non-neoplastic dermatoses. | . | . |
| 4 | . | . | . | inflammatory dermatoses. | . |
| 5 | . | . | . | . | acute inflammatory dermatoses. |
| 6 | . | . | . | . | chronic inflammatory dermatoses. |
| 7 | . | . | . | . | granulomatous inflammatory dermatoses. |
| 8 | . | . | . | . | infectious dermatoses. |
| 9 | . | . | . | vesiculobullous dermatoses. | . |
| 10 | . | . | . | follicular dermatoses. | . |
| 11 | . | . | . | atrophic dermatoses. | . |
| 12 | . | . | . | connective-tissue dermatoses. | . |
| 13 | . | . | . | reactive dermatoses. | . |
| 14 | . | . | neoplastic dermatoses. | . | . |
| 15 | . | . | . | keratinocytic neoplastic dermatoses. | . |
| 16 | . | . | . | appendageal neoplastic dermatoses. | . |
| 17 | . | . | . | fibroblastic neoplastic dermatoses. | . |
| 18 | . | . | . | melanocytic neoplastic dermatoses. | . |
| Д | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | +İ | . | . | . | . |
| 1 | . | ~skin. | . | . | . |
| 2 | . | +skin. | . | . | . |
| 3 | . | . | ~PSORIASIFORM DERMATITIS. | . | . |
| 4 | . | . | +PSORIASIFORM DERMATITIS. | . | . |
| 5 | . | . | . | Psoriasis | . |
| 6 | . | . | . | . | Munro microabscess. |
| 7 | . | . | . | Healed psoriasis. | . |
| 8 | . | . | . | Prurigo nodularis. | . |
| Д | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | +İ | . | . | . | . |
| 1 | . | ~skin. | . | . | . |
| 2 | . | +skin. | . | . | . |
| 3 | . | . | ~LICHENOID INTERFACE DERMATITIS. | . | . |
| 4 | . | . | +Lichenoid interface dermatitis. | . | . |
| 5 | . | . | . | Connective Tissue Disease,
e.g., Lupus erythematosus. | . |
| 6 | . | . | . | Lichen planus. | . |
| 7 | . | . | . | Photodermatitis. | . |
| 8 | . | . | . | Drug reaction. | . |
| 9 | . | . | . | Lichen sclerosus et atrophicus. |
. |
| 10 | . | . | . | Poikiloderma atrophicans vasculare. |
. |
| 11 | . | . | . | Graft-vs-host disease. | . |
| 12 | . | . | . | Lichen nitidus. | . |
| 13 | . | . | . | Lichenoid actinic keratosis. |
. |
| 14 | . | . | . | Secondary syphilis. | . |
| 15 | . | . | . | . | superficial dermal plasma cell proliferation. |
| 16 | . | . | . | Arthropod bite reaction. |
. |
| 17 | . | . | . | Lichenoid benign keratosis. |
. |
| 18 | . | . | . | Parapsoriasis. | . |
| 19 | . | . | . | Chronic progressive pigmented purpura. |
. |
| 20 | . | . | . | Mycosis fungoides, patch stage. | . |
| 21 | . | . | . | . | Pautrier microabscess. |
| 22 | . | . | . | . | Spongiform pustule of Kogoj. |
| Д | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | +İ | . | . | . | . |
| 1 | . | ~skin. | . | . | . |
| 2 | . | +skin. | . | . | . |
| 3 | . | . | ~ERYTHRODERMA. | . | . |
| 4 | . | . | +ERYTHRODERMA. | . | . |
| 5 | . | . | . | Sezary syndrome. | . |
| 6 | . | . | . | Seborrheic dermatitis. | . |
| 7 | . | . | . | Psoriasis. | . |
| 8 | . | . | . | Drug reaction. | . |
| 9 | . | . | . | Toxic epidermal necrolysis. | . |
| 10 | . | . | . | Sunburn. Radiation burn. First degree burn. |
. |
| 11 | . | . | . | Visceral malignancies with erythema. |
. |
| 12 | . | . | . | Pityriasis rubra pilaris. |
. |
| Д | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | +İ | . | . | . | . |
| 1 | . | ~dermatitis. | . | . | . |
| 2 | . | +dermatitis. | . | . | . |
| 3 | . | . | ~vesicular dermatitis. | . | . |
| 4 | . | . | +vesicular dermatitis. | . | . |
| 5 | . | . | . | +subcorneal pustule. | . |
| 6 | . | . | . | . | +subcorneal pustular dermatosis. |
| 7 | . | . | . | . | dermatophytosis. |
| 8 | . | . | . | . | bullous impetigo. |
| 9 | . | . | . | +intraepidermal acantholytic vesicular dermatitis. |
. |
| 10 | . | . | . | . | pemphigus vulgaris. |
| 11 | . | . | . | . | Darier's disease. |
| 12 | . | . | . | . | Hailey-Hailey disease. |
| 13 | . | . | . | . | Grover's disease. |
| 14 | . | . | . | . | Herpesvirus infection. |
| 15 | . | . | . | . | Staphylococcal scalded skin syndrome. |
| 16 | . | . | . | +subepidermal vesicular dermatitis. |
. |
| 17 | . | . | . | . | epidermolysis bullosa acquisita. |
| 18 | . | . | . | . | porphyria cutanea tarda. |
| 19 | . | . | . | . | bullous pemphigoid. |
| 20 | . | . | . | . | herpes gestationis. |
| 21 | . | . | . | . | dermatitis herpetiformis. |
| 22 | . | . | . | . | linear IgA dermatosis. |
| 23 | . | . | . | . | subacute cutaneous lupus erythematosus. |
İ
~dermatitis.
+dermatitis.
~vesicular dermatitis.
+vesicular dermatitis.
subcorneal pustule.
intraepidermal acantholytic vesicular dermatitis.
subepidermal vesicular dermatitis.
+vesicular dermatitis.
+subcorneal pustule.
subcorneal pustular dermatosis.
subcorneal pustular dermatosis.
Sneddon-Wilkinson disease.
subcorneal pustular dermatosis.
subcorneal neutrophils, rare eosinophils.
mild epidermal spongiosis.
superficial perivascular neutrophilic infiltrate.
dermatophytosis.
positive PAS/GMS stain for dermatophytosis.
bullous impetigo.
subcorneal neutrophils, rare eosinophils.
mild epidermal spongiosis.
superficial perivascular neutrophilic infiltrate.
+intraepidermal acantholytic vesicular dermatitis.
pemphigus vulgaris.
widespread acantholysis.
middle-aged or older.
fragile, flaccid bullae.
intra-epidermal acantholytic vesicular dermatosis.
suprabasal clefts and blisters
acantholysis extends to follicles.
epidermal spongiosis and eosinophils.
~corps ronds and grains.
Darier's disease.
Darier's disease.
keratosis follicularis.
Darier's disease.
autosomal dominant.
slowly progressive, hyperkeratotic papules.
follicular distribution.
suprabasal acantholysis.
clefts or lacunae.
corps ronds and grains.
Hailey-Hailey disease.
Hailey-Hailey disease.
benign familial pemphigus.
Hailey-Hailey disease.
autosomal dominant.
acantholysis, epidermal hyperplasia.
full-thickness acantholysis.
no hair-follicle involvement.
Grover's disease.
Grover's disease.
transient acantholytic dermatosis.
Grover's disease.
spongiosis.
small, focal acantholysis.
Herpesvirus infection.
acantholysis.
multinucleated cells.
typical Herpes cytopathic changes.
Staphylococcal scalded skin syndrome.
focal acantholysis.
cleavage plane in granular layer.
+subepidermal vesicular dermatitis.
sparse infiltrate.
epidermolysis bullosa acquisita.
porphyria cutanea tarda.
eosinophilic infiltrate.
bullous pemphigoid.
herpes gestationis.
pregnant ♀ patient.
neutrophilic infiltrate.
dermatitis herpetiformis.
linear IgA dermatosis.
subacute cutaneous lupus erythematosus.
İ
~dermatosis.
+dermatosis.
~fibrosing-dermatosis.
+fibrosing-dermatosis.
+hypertrophic scar.
+keloid.
+lichen sclerosus.
+radiation sclerosis.
+morphea/scleroderma.
+fibrosing-dermatosis.
+hypertrophic scar.
horizontally oriented fibroblasts and collagen bundles.
perpendicularly oriented blood vessels.
+keloid.
haphazard arrangement, irregularly thickened collagen bundles.
+lichen sclerosus.
edema.
hyalinization of papillary dermis.
inflammatory cell band-like infiltrate.
+radiation sclerosis.
hyalinization of blood vessels.
history of irradiation.
+morphea/scleroderma.
sclerosis involving:
reticular dermis.
sututaneous fat.
plasma-cell infiltrate.
İ
~skin.
+skin.
~skin cyst.
+skin cyst.
+epidermal inclusion cyst.
+trichilemmal cyst.
+hidrocystoma.
+dermoid cyst.
+steatocystoma.
+skin cyst.
+epidermal inclusion cyst.
lining epithelium: similar to surface epidermis.
granular cell layer present.
cyst contents: laminated keratin.
+trichilemmal cyst=pilar cyst.
lining epithelium: similar to follicular isthmus.
granular cell layer absent.
cyst contents: compact keratin, areas of calcification.
+hidrocystoma.
lining epithelium:
tall columnar epithelium.
outer myoepithelial layer.
cyst contents:
decapitation secretion.
+dermoid cyst.
lining epithelium:
squamous epithelium.
mature adnexal structure in wall.
cyst contents:
hair-shafts in lumen.
+steatocystoma.
lining epithelium:
squamous epithelium.
corrugated keratin.
sebaceous lobules in wall.
cyst contents: laminated keratin.
İ
~skin.
+skin.
~dysplastic/neoplastic proliferations of skin.
+dysplastic/neoplastic proliferations of skin.
+epithelial dysplastic/neoplastic proliferations.
+epidermal dysplastic/neoplastic proliferations.
+adnexal dysplastic/neoplastic proliferations.
+follicular.
+eccrine.
+apocrine.
+sebaceous.
+melanocytic dysplastic/neoplastic proliferations.
+nevus.
+melanoma.
+mesenchymal dysplastic/neoplastic proliferations.
+vascular.
+fibroblastic.
+smooth-muscle.
+neural.
+lymphoproliferative dysplastic/neoplastic proliferations.
+lymphoma.
+histiocytosis X.
+dysplastic/neoplastic proliferations.
+epithelial dysplastic/neoplastic proliferations.
+epidermal dysplastic/neoplastic proliferations.
seborrheic keratosis.
clear cell acanthoma.
verruca vulgaris.
actinic keratosis.
squamous cell carcinoma.
keratoacanthoma.
+adnexal dysplastic/neoplastic proliferations.
+follicular.
trichoepithelioma.
pilomatricoma.
trichilemmoma.
basal cell carcinoma.
+eccrine.
syringoma.
poroma.
spiradenoma.
porocarcinoma.
+apocrine.
cylindroma.
clear cell hidradenoma.
syringocystoma papilliferum.
hidradenoma papilliferum.
microcystic adnexal carcinoma.
+sebaceous.
nevus sebaceus.
sebaceous hyperplasia.
sebaceous adenoma.
sebaceous epithelioma.
sebaceous carcinoma.
İ
~ovary
+ovary
~ovarian neoplasm.
+ovarian neoplasm.
+epithelial ovarian neoplasm.
+epithelial cystic ovarian neoplasm.
+epithelial solid ovarian neoplasm.
+ovarian sex cord stromal tumor.
+ovarian germ cell tumor.
+other ovarian neoplasm.
+ovarian neoplasm.
+epithelial ovarian neoplasm.
+epithelial cystic ovarian neoplasm.
benign serous tumor.
borderline atypically proliferating serous tumor.
serous adenocarcinoma.
benign mucinous tumor.
borderline atypically proliferating mucinous tumor.
mucinous adenocarcinoma.
+epithelial solid ovarian neoplasm.
endometrioid adenocarcinoma.
clear cell tumor.
Brenner tumor.
atypically proliferating Brenner tumor.
malignant Brenner tumor.
transitional cell carcinoma of ovary.
small cell carcinoma of ovary.
+ovarian sex cord stromal tumor.
granulosa cell tumor.
granulosa cell tumor adult type.
granulosa cell tumor juvenile type.
Sertoli cell tumor.
Sertoli-Leydig cell tumor.
gynandroblastoma.
+ovarian germ cell tumor.
mature teratoma.
dermoid cyst.
dysgerminoma.
yolk sac tumor.
Schiller-Duval bodies.
small cystic spaces.
mixed germ cell tumor.
embryonal carcinoma.
polyembryoma.
+other ovarian neoplasm.
struma ovarii.
mature thyroid tissue.
struma carcinoid.
neuroendocrine nests.
small blue cell tumor.
associated with teratoma.
metastatic tumor.
malignant cells in cortex and hilum.
primary tumor usually gastrointestinal.
gonadoblastoma.
germ cells.
calcifications.
amorphous eosinophilic material.
carcinosarcoma.
malignant stromal elements.
malignant epithelial elements.
İ
~adult.
+adult.
~renal mass.
+renal mass.
+multicystic renal mass.
+solid renal mass.
+renal mass.
+multicystic renal mass.
acquired renal cystic disease.
renal cortical cysts.
medullary sponge kidney disease.
renal medullary cysts.
adult polycystic kidney disease.
renal cortical and medullary cysts.
+solid renal mass.
predominantly inflammatory.
xanthogranulomatous pyelonephritis.
predominantly cystic.
renal cell carcinoma.
cystic nephroma.
predominantly vascular.
renal cell carcinoma.
hemangioma.
angiomyolipoma.
juxtaglomerular cell tumor.
predominantly tubular.
renal cell adenoma.
oncocytoma.
metanephric adenoma.
metastatic adenocarcinoma.
predominantly spindle cells.
sarcomatoid renal cell carcinoma.
small blue cell tumor.
lymphoma.
clear cell tumor.
renal cell carcinoma.
papillary differentiation.
renal cell carcinoma.
metanephric adenoma.
1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.
2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.
3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty;
4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).
5. Conative rule. Necessary data should be collected if the patient consents (conative).
6. Vexative rule. Data or demanded in order of medical need;
7. Ontology rule. Necessary data increase one's certainty of medical entities.
8. Ethical data collection rule. All data are either positive, negative, failed-attempt, or not-attempted.
9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.
(a) For every pCP and aCA, a ~= p;
(b) For every dCD, there exists a unique ~dC(D-(P∪E)); and
(c) and for every eCE, there exists a unique ~eC(E-(P∪D)).
1. U c (A-P).
2. For every UCЮ and uCU, ~u ~CU.
3. For every uCU, there exists a unique INFLECTION POINT, I, at which:3a. For 0 < j < I, uj/uЛ = -1; and
3b. For I < k < Л, uk/uI = +1.
| Д | 0 | 1 |
|---|---|---|
| 1 | +İ[0] | . |
| 2 | . | +A[0] |
| 3 | . | ~A[0] |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 1 | +İ[0] | . | . |
| 2 | . | +A[0] | . |
| 3 | . | . | ~A[0] |
| Д | 0 | 1 |
|---|---|---|
| 1 | +İ[0] | . |
| 2 | . | +A[1 |
| 3 | . | ~A[2 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 1 | +İ[0] | . | . |
| 2 | . | +A[1 | . |
| 3 | . | . | ~A[2 |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ[0] | . |
| 1 | . | ~İ[0] |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A0 | . |
| 2 | . | . | ~İ0 |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +İ0 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A1 | . |
| 2 | . | . | +İ0 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A1 | . |
| 2 | . | . | . |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +A1 |
| 2 | . | ~A2 |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +A0 |
| 2 | . | ~A0 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A0 | . |
| 2 | . | . | +B0 |
| 3 | . | . | ~B0 |
| 4 | . | ~A0 | . |
| 5 | . | . | +B0 |
| 6 | . | . | ~B0 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A[1 | . |
| 2 | . | . | +A[2 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A[1 | . |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +A1 |
| 2 | . | +B2 |
| Д | 0 | 1 |
|---|---|---|
| 0 | +İ0 | . |
| 1 | . | +A1 |
| 2 | . | +B2 |
| 3 | . | +C3 |
| Д | 0 | 1 | 2 |
|---|---|---|---|
| 0 | +İ0 | . | . |
| 1 | . | +A1 | . |
| 2 | . | . | +B2 |
1. ≈ log2n steps, logarithmic (sorted fetch).For all intents and purposes, a computer algorithm that requires more than polynomial steps is incomputable for interesting size n, i.e., more than a dozen or so, with today's computing machinery. Therefore, it is important to prove that a given algorithm is polynomial. See: http://www.netautopsy.org/modlthry.htm
2. ≈ n steps, linear (unsorted fetch).
3. ≈ n log2n steps, log-linear (sorting).
4. ≈ nk steps, polynomial (inefficient sorting).
5. ≈ non-polynomial-complete: at least polynomial (tree problems).
6. ≈ 2n steps, exponential.
7. ≈ greater than 2n steps, exponential (Pressburger algebra).
8. infinite, (Gödel statements).
1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.
2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.
3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty;
4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).
5. Conative rule. Necessary data should be collected if the patient consents (conative).
6. Vexative rule. Data or demanded in order of medical need;
7. Ontology rule. Necessary data increase one's certainty of medical entities.
8. Ethical data collection rule. All data are either positive, negative, failed-attempt, or not-attempted.
9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.
| . | New Test-> | No | Yes | Total |
|---|---|---|---|---|
| Gold | No | a | b | v |
| Standard | Yes | c | d | w |
| . | Total | x | y | z |
1. Harvesting the contents of the disease-folio, csv(icsv,icol).
2. Converting the disease-folio into the nandset, nand(inand,kname).
3. Solving the nandset, soln(isoln).
http://www.netautopsy.org/ordrlogc.txtconverts a *.csv-file, downloaded from a *.xls-file, prepared according to the rules of order-logic, described at: http://www.netautopsy.org/ordrlogc.htm The general form is:
1,+i,,,,,,
2,,+u,,,,,
3,,,+w,,,,
4,,,-x,,,,
5,,-v,,,,,
6,,,+y,,,,
7,,,-z,,,,
In the software, the *.csv-array is loaded as:
$csvar[1]="1,+i,,,,,,";
$csvar[2]="2,,+u,,,,,";
$csvar[3]="3,,,+w,,,,";
$csvar[4]="4,,,-x,,,,";
$csvar[5]="5,,-v,,,,,";
$csvar[6]="6,,,+y,,,,";
$csvar[7]="7,,,-z,,,,";
The topmost-leftmost filled-in cell is named +i.
Each file has consecutive ROWs, numbered 1,...,$nrow,
and NAMes, numbered 1,...,$nnam. In the above *.csv file,
the rows are numbered 1,...,7, and the names are:
i, u, v, w, x, y, z. Each row has exactly one filled-in cell.
Therefore, each row, $irow, has a unique designated column-number,
$rwcl[$irow], a unique designated name, $rwnm[$irow],
and a unique designated sign, $rwsg[$irow].
Some rows contain a firstborn, FSB, i.e., a filled-in cell
whose immediate-left-immediate-above-cell is filled-in.
All other rows are either the ultimate-parent, i, or else
a sibling, SBL. To each firstborn, there corresponds
at most one non-vacuous nandset, NDS. The software
constructs the set of firstborn-nonvacuous nandsets,
and solves them.
The example-file is as follows:
1,+i,,,,,,
2,,+i,,,,,
3,,,+female,,,,
4,,,,-male,,,
5,,,+male,,,,
6,,,,-female,,,
7,,+i,,,,,
8,,,+male,,,,
The rows are numbered 1,...,8,
and the names are: i, female, male.
This file states that every patient
is male or female; every male is a female;
every female is a male; and the current patient
is a male. From this information, the program
concludes that the patient is not a female.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
### ordrlogc.cgi: PERL script to perform ORDER LOGIC.
### U. S. Government work, uncopyrighted, submitted for publication.
### See details at bottom of page.
### Last modified: 8/19/2004, G. William Moore, MD, PhD.
###
### PRINT HEADER.
print qq|<html><head><title> ORDER LOGIC CALCULATOR. </title></head><body>|;
print qq|\n<!-- Last modified: 8/19/2004, G. William Moore, MD, PhD.-->|;
print qq|\n<h2><center> ORDER LOGIC CALCULATOR. |;
print qq|\n<br><a href="http://www.netautopsy.org/ordrlogc.htm"> |;
print qq|\n http://www.netautopsy.org/ordrlogc.htm </a> |;
print qq|\n<br> U. S. Government work, uncopyrighted,|;
print qq|\n<br> submitted for publication. |;
print qq|\n<br> DRAFT COPY ONLY: DEMONSTRATION. |;
print qq|\n<br> Sample problem: the calculator should conclude |;
print qq|\n<br> that the patient is +male and -female. </center></h2> |;
###
### LOAD INPUT DATA: Microsoft(R) Excel(R) *.csv file.
### See: http://www.netautopsy.org/ordrlogc.htm
$csvar[0]="0,1,2,3,4,5,6,7,8" ; $csvar[1]="1,+i,,,,,,," ;
$csvar[2]="2,,+i,,,,,," ; $csvar[3]="3,,,+female,,,,," ;
$csvar[4]="4,,,,-male,,,," ; $csvar[5]="5,,,+male,,,,," ;
$csvar[6]="6,,,,-female,,,," ; $csvar[7]="7,,+i,,,,,," ;
$csvar[8]="8,,,+male,,,,," ;
### SAMPLE PROBLEM: THE CALCULATOR CONCLUDES THAT
### THE PATIENT IS MALE, NOT FEMALE.
### FIRST PASS THROUGH THE $csvspl ARRAY, SPLIT ON COMMAS.
$nrow=0; $irow=0; $nnomen=0; $nnam=0;
while($irow<299){$irow++; $csvlin=$csvar[$irow]; $csvlng=length($csvlin);
if($csvlng<6){$irow=1000;};
if($irow<299){$nrow++; @csvspl=split(/,/,$csvlin);
$ncsvspl=@csvspl; $icsvspl=0;
### VALUE OF SPLIT-ELEMENT=$vspl.
while($icsvspl<$ncsvspl){$icsvspl++; $vspl=$csvspl[$icsvspl];
### ROW-SIGN OF $vspl=$sgspl. LENGTH OF $vspl=$lspl.
if($vspl ne ""){$sgspl=substr($vspl,0,1); $lspl=length($vspl);
### NAME OF $vspl=$nmspl.
if($lspl>1){$nmspl=substr($vspl,1,$lspl-1); $mnam=0;
if($nmspl ne ""){$nemi=$nemon{$nmspl}-0;
### IF $nmspl ALREADY KNOWN, THEN NUMBER=$nemon{$nmspl};
if($nemi>0){$mnam=$nemi;};
### IF $nmspl NOT KNOWN, THEN INCREMENT NUMBER $nnomen.
if($nemi<1){$nnomen++; $mnam=$nnomen; $nemon{$nmspl}=$mnam;
print qq|\n<br> mnam $mnam $nmspl |;
$prprt[$nnomen]=$nmspl; $nomen[$nnomen]=$nemi;};
### ASSIGN COLUMN-NUMBER, $icsvspl, TO $rwcl[$nrow].
$rwcl[$nrow]=$icsvspl;
### ASSIGN ROW-NAME, $mnam, TO $rwnm[$nrow].
$rwnm[$nrow]=$mnam; $rwsg[$nrow]=0;
### ASSIGN ROW-SIGN, $sgspl, TO $rwsg[$nrow].
if($sgspl eq "+"){$rwsg[$nrow]=1;}
if($sgspl eq "-"){$rwsg[$nrow]=-1;};};};};};};};
$irow=0;
print qq|\n<br> Raw data matrix: $nrow rows. |;
while($irow<$nrow){$irow++; $rwln=$csvar[$irow];
print qq|\n<br> $rwln |;};
### CONSTRUCT NULLITIES/NANDSETS.
$nnand=0; $ncol=1; $irow=1;
while($irow<$nrow){$irow++;
$clnri=$rwcl[$irow]; $clnrh=$rwcl[$irow-1]+1;
### TEST FOR FIRSTBORN.
if($clnri==$clnrh){$rwsgf=$rwsg[$irow];
$rwngf=-$rwsgf; $rwnmf=$rwnm[$irow]; $rwprf=$prprt[$rwnmf];
### ZERO THE TEMPORARY NANDSET.
$krow=1; $tempn[1]=1; while($krow<$nnomen){$krow++; $tempn[$krow]=0;};
### CALCULATE PARENT TERM.
$rwsgp=$rwsg[$irow-1]; $rwngp=-$rwsgp;
$rwnmp=$rwnm[$irow-1]; $rwprp=$prprt[$rwnmp];
### COMPARE PARENT TERM TO FIRSTBORN TERM.
$jrow=$irow;
if($rwnmf==$rwnmp){
### VACUOUS NULLITY: WARNING
if($rwsgf==$rwsgp){$jrow=2*$nrow;
print qq|\n<br> Warning: vacuous nullity at row $irow: $rwnmf $rwprf |;};
### SQUAWK NULLITY: INCONSISTENCY.
if($rwngf==$rwsgp){$jrow=2*$nrow;
print qq|\n<br> SQUAWK!! Inconsistent nullity at row $irow: $rwnmf $rwprf |;
print qq|\n<br><hr> Last modified: 8/19/2004, |;
print qq| G. William Moore, MD, PhD. |;
print qq|\n <br></body></html>\n\n |; exit;};};
### IF PARENT TERM IS DISTINCT FROM FIRSTBORN TERM.
if($jrow<=$nrow){$tempn[$rwnmp]=$rwsgp; $tempn[$rwnmf]=$rwngf;
### WHILE-LOOP: TEST FOR SIBLINGS.
while($jrow<$nrow){$jrow++; $clnrj=$rwcl[$jrow];
if($clnrj==$clnri){$rwsgs=$rwsg[$jrow]; $rwngs=-$rwsgs;
$rwnms=$rwnm[$jrow]; $tempn[$rwnms]=$rwngs;};
### NO MORE SIBLINGS REMAINING: END THE WHILE-LOOP.
if($clnrj<$clnri){$jrow=2*$nrow;};};
### INCREMENT THE NANDSET MATRIX.
$nnand++; $knom=1; $nandc[$nnand]=0; $nand[$nnand][1]=0;
while($knom<$nnomen){$knom++; $tpn=$tempn[$knom];
if($tpn>0){$nandc[$nnand]++;}; if($tpn<0){$nandc[$nnand]++;};
$nand[$nnand][$knom]=$tpn;};};};};
### PRINT NANDSETS.
print "\n<br> Nandsets: ";
$knand=0;
while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
print "\n<br> nand $knand,$tpn: ";
while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
### ZERO INITIAL SOLUTIONS.
$soln[1]=-1; $knom=1; while($knom<$nnomen){$knom++; $soln[$knom]=0;};
### FIND INITIAL SOLUTIONS.
$knand=0;
while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
if($tpn<2){$nandc[$knand]=0; $knom=1;
while($knom<$nnomen){$knom++; $slv=$nand[$knand][$knom];
if(($slv>0)||($slv<0)){$soln[$knom]=$slv; $hnom=0;
while($hnom<$nnomen){$hnom++; $nand[$knand][$hnom]=0;};};};};};
### PRINT INITIAL SOLUTIONS.
print "\n<br> Initial Solutions: "; $knom=0;
while($knom<$nnomen){$knom++; $slv=$soln[$knom]; $nem=$prprt[$knom];
$done[$knom]=0;
if($slv>0){print "\n<br> $knom $slv -$nem";};
if($slv<0){print "\n<br> $knom $slv +$nem";};};
### PRINT NANDSETS AGAIN.
print "\n<br> Nandsets: "; $knand=0;
while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
print "\n<br> nand $knand,$tpn: ";
while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
### ITERATIVE SOLUTION.
$isolve=0; $ksolve=0; $nsolve=$nnomen;
while($ksolve<$nsolve){$ksolve++; $done[$ksolve]=0;};
while($isolve<3){$isolve++;
### PERFORM NANDSET ARITHMETIC.
$isoln=1;
while($isoln<$nnomen){$isoln++; $slv=$soln[$isoln]; $ngslv=-$slv;
$don=$done[$isoln];
if($don<1){if(($slv>0)||($slv<0)){$knand=0;
if($slv>0){print "\n<br> isoln $isoln $slv -$prprt[$isoln]";};
if($slv<0){print "\n<br> isoln $isoln $slv +$prprt[$isoln]";};
while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
if($tpn>0){$kkk=$nand[$knand][$isoln];
if(($kkk>0)||($kkk<0)){$done[$isoln]=1;
if($kkk==$slv){$nandc[$knand]=$tpn-1;
$hnom=0; $nandc[$knand]=0;
while($hnom<$nnomen){$hnom++;$nand[$knand][$hnom]=0;};};
if($kkk==$ngslv){$nandc[$knand]=$tpn-1;
$nand[$knand][$isoln]=0;};};};};};};};
### FIND NEW SOLUTIONS.
$knand=0; $istop=0;
while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
if($tpn>1){$istop++;};
if($tpn<2){$nandc[$knand]=0; $knom=1;
while($knom<$nnomen){$knom++; $slv=$nand[$knand][$knom];
if(($slv>0)||($slv<0)){$soln[$knom]=$slv; $hnom=0;
if($slv>0){print "\n<br> isoln $knom $slv -$prprt[$knom]";};
if($slv<0){print "\n<br> isoln $knom $slv +$prprt[$knom]";};
while($hnom<$nnomen){$hnom++; $nand[$knand][$hnom]=0;};};};};};
### PRINT NANDSETS AGAIN.
print "\n<br> Nandsets: $isolve ";
$knand=0; $istop=0;
while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
if($tpn>1){$istop++;};
print "\n<br> nand $knand,$tpn: ";
while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
if($istop<1){$isolve=999;};};
### END JOB.
print qq|\n<br><hr> Last modified: 8/19/2004, G. William Moore, MD, PhD. |;
print qq|\n <br></body></html>\n\n |; exit;
VISUAL BASIC SOURCE CODE.
Sub ordrlogc()
Dim nrow, irow, jrow, krow, nnam, inam, jnam, knam, hnam, knand As Integer
Dim isoln, isolve, ksolve, nsolve, ksoln, nsoln As Integer
Dim rwsav, nmsav, ndsav, rowsw, namsw, thsnam, nnand, tpk, don, slv, ngslv As Integer
Dim arr(20, 20), rwcl(20), rwsg(20), rwnm(20), tempn(20), soln(20), done(20) As Integer
Dim nandc(20), nand(20, 20) As Integer
Dim rwvij, rwvsg, rwvcl, rwvnm, namk As String
Dim rwcli, rwclj, rwclp, rwclf, rwcls As Integer
Dim rwsgi, rwsgj, rwsgp, rwsgf, rwsgs As Integer
Dim rwngi, rwngj, rwngp, rwngf, rwngs As Integer
Dim rwnmi, rwnmj, rwnmp, rwnmf, rwnms As Integer
Dim prprt(20), rwpri, rwprj, rwprp, rwprf, rwprs, prk As String
irow = 0
nrow = 0
krow = 0
rwsav = 0
nmsav = 0
ndsav = 0
rowsw = 0
nnand = 0
'Enter disease-folio from Excel Spreadsheet, by rows.
Do
irow = irow + 1
rowsw = 0
If (irow > 10) Then Exit Do
jrow = 0
'Examine the row for the unique, filled-in cell.
Do
jrow = jrow + 1
If (jrow > 10) Then Exit Do
rwvij = Cells(irow, jrow).Value
lrwvij = Len(rwvij)
If (lrwvij > 1) Then
rowsw = 1
'Row-column, rwcl(irow)
rwcl(irow) = jrow
'Row-sign, rwsg(irow)
rwvsg = Mid(rwvij, 1, 1)
If (rwvsg = "+") Then rwsg(irow) = 1
If (rwvsg = "-") Then rwsg(irow) = -1
rwvnm = Mid(rwvij, 2, lrwvij)
knam = 0
thsnam = 0
'Look for existing row-name.
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
namk = prprt(knam)
If (namk = rwvnm) Then
thsnam = knam
rwnm(irow) = knam
End If
Loop
'Increment the name-counter, nmsav.
If (thsnam = 0) Then
nmsav = nmsav + 1
prprt(nmsav) = rwvnm
thsnam = nmsav
rwnm(irow) = thsnam
End If
End If
Loop
If (rowsw > 0) Then nrow = nrow + 1
Cells(12, 2) = "name"
Cells(12, 3) = "sign"
Cells(12, 4) = "col"
Cells(irow + 12, 2) = rwnm(irow)
Cells(irow + 12, 3) = rwsg(irow)
Cells(irow + 12, 4) = rwcl(irow)
Loop
'CONSTRUCT NULLITIES/NANDSETS.
nnand = 0
ncol = 1
irow = 1
Do
irow = irow + 1
If (irow > nrow) Then Exit Do
'Test for firstborn status.
rwcli = rwcl(irow) - 1
rwclh = rwcl(irow - 1)
'Row irow is firstborn.
jrow = irow
If (rwcli = rwclh) Then
rwsgf = rwsg(irow)
rwngf = -rwsgf
rwnmf = rwnm(irow)
rwclf = rwcl(irow)
rwprf = prprt(rwnmf)
'Zero the temporary nandset.
krow = 1
tempn(1) = 1
Do
krow = krow + 1
If (krow > nmsav) Then Exit Do
tempn(krow) = 0
Loop
'Calculate the parent term.
rwsgp = rwsg(irow - 1)
rwngp = -rwsgp
rwnmp = rwnm(irow - 1)
rwclp = rwcl(irow - 1)
rwprp = prprt(rwnmp)
Cells(12, 7) = "name"
Cells(12, 8) = "sign"
Cells(12, 9) = "col"
Cells(12, 10) = "name"
Cells(12, 11) = "sign"
Cells(12, 12) = "col"
Cells(irow + 12, 7) = rwnmp
Cells(irow + 12, 8) = rwsgp
Cells(irow + 12, 9) = rwclp
Cells(irow + 12, 10) = rwnmf
Cells(irow + 12, 11) = rwsgf
Cells(irow + 12, 12) = rwclf
If (rwnmf = rwnmp) Then
'Vacuous nullity warning.
If (rwsgf = rwsgp) Then
Cells(22, 1) = "Warning: Vacuous nandset at " + prprt(rwnmp)
jrow = 2 * nrow
End If
'Inconsistent nullity warning.
If (rwngf = rwsgp) Then
Cells(22, 1) = "Warning: inconsisent nandset at " + prprt(rwnmp)
jrow = 2 * nrow
End If
End If
'If parent term distinct from firstborn term.
If (jrow <= nrow) Then
tempn(rwnmp) = rwsgp
tempn(rwnmf) = rwngf
Do
jrow = jrow + 1
If (jrow > nrow) Then Exit Do
rwclj = rwcl(jrow)
rwsgj = rwsg(jrow)
rwngj = -rwsgj
rwnmj = rwnm(jrow)
'Test for siblings.
If (rwclj = rwclf) Then
rwcls = rwclj
rwsgs = rwsgj
rwngs = -rwsgs
rwnms = rwnmj
tempn(rwnms) = rwngs
End If
'No more siblings left
If (rwclj < rwclf) Then
jrow = 2 * nrow
End If
Loop
End If
'Increment the nandset matrix.
nnand = nnand + 1
knam = 1
nandc(nnand) = 0
nand(nnand, 1) = 0
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
tpk = tempn(knam)
nand(nnand, knam) = tpk
If (tpk > 0) Then
nandc(nnand) = nandc(nnand) + 1
End If
If (tpk < 0) Then
nandc(nnand) = nandc(nnand) + 1
End If
Loop
End If
Loop
'Print nandsets.
knand = 0
Do
knand = knand + 1
If (knand > nnand) Then Exit Do
knam = 1
tpk = nandc(knand)
Cells(knand + 24, 1) = tpk
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
Cells(knand + 24, knam) = nand(knand, knam)
Loop
Loop
'Zero initial solutions.
soln(1) = -1
knam = 1
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
soln(knam) = 0
Loop
' Find initial solutions.
knand = 0
Do
knand = knand + 1
If (knand > nnand) Then Exit Do
tpk = nandc(knand)
If (tpk < 2) Then
nandc(knand) = 0
knam = 1
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
slv = nand(knand, knam)
If (slv > 0) Then
soln(knam) = slv
hnam = 0
Do
hnam = hnam + 1
If (hnam > nmsav) Then Exit Do
nand(knand, hnam) = 0
Loop
End If
If (slv < 0) Then
soln(knam) = slv
hnam = 0
Do
hnam = hnam + 1
If (hnam > nmsav) Then Exit Do
nand(knand, hnam) = 0
Loop
End If
Loop
End If
Loop
' Print initial solutions.
knam = 0
knand = 0
Do
knand = knand + 1
If (knand > nnand) Then Exit Do
knam = 0
Do
knam = knam + 1
If (knam > nmsav) Then Exit Do
slv = soln(knam)
If (slv > 0) Then
Cells(34 + knam, 1) = knam
Cells(34 + knam, 2) = slv
End If
If (slv < 0) Then
Cells(34 + knam, 1) = knam
Cells(34 + knam, 2) = slv
End If
Loop
Loop
'Iterative solution for nandsets.
isolve = 0
ksolve = 0
nsolve = nmsav
Do
ksolve = ksolve + 1
If (ksolve > nsolve) Then Exit Do
done(ksolve) = 0
Loop
Do
isolve = isolve + 1
If (isolve > nsolve) Then Exit Do
'Perform nandset arithmetic.
isoln = 1
Do
isoln = isoln + 1
If (isoln > nsolve) Then Exit Do
slv = soln(isoln)
ngslv = -slv
don = done(isoln)
If (slv > 0) Then
End If
Loop
Loop