What’s the internal language of the opposite of a Cartesian closed category?

I have heard the simply typed lambda calculus is the internal language of Cartesian closed categories.

What’s the internal language of the opposite type of category?

I have the intuition the opposite category would correspond to continuation passing style or pattern matching but the opposite typing rules seem very strange and hard to figure out.

The opposite of a Tit-for-Tat strategy

The tit-for-tat strategy is a well-known strategy that can be applied, for example, in the Iterated Prisoner’s Dilemma (IPD). Roughly, the idea is that you always repeat what the opponent did in the previous round.

I was wondering, does there exist a name for the opposite of a tit-for-tat strategy? That is, a strategy in which you always do the exact opposite of what your opponent did in the previous round.

Of course, in the IPD such a strategy wouldn’t make any sense, but there may be other games where it does. Any links to papers that have investigated such strategies are welcome.

Opposite Alignments in the Party

I am currently DMing a Star Wars D&D campaign.
One character has a backstory that includes ‘setting orphans on fire’. Needless to say, he is a murder hobo and a Sith. One of my other characters plays a Jedi. Although he left the Order when he realized almost everyone else was playing Sith, his character is still good. He feels uncomfortable when other players are doing evil things, and doe’snt join in. This means he doesn’t get to play much, just watching other players murder.

How can I make it so that I can meet the needs of my murder hobo, and the player who wants to do good? They are both roughly my age, so I can’t pull a ‘Dad move’ on the murder hobo. Thanks!

Is there an opposite class for a Witch that is generally considered the good version? [on hold]

Is there a good class counterpart for a witch? Not a white witch but a completely different class that is generally considered the ‘light’ version (where the witch is the ‘dark’ version)

Additional Info:

The motivation for the question is I am trying to create a story for my own game, so I am not really playing any specific game. I need a class that I can consider as an opposite of the witch. I know this may vary from game to game; I wanted to know what class(es) has/have been considered by games as the good opposite of a witch, whatever those games maybe.

Does a target have total cover from a ranged attacker positioned on an opposite corner of a hallway?

Consider the diagram below:

 N    WWWWWWW   W = Wall W E   OOOOOOO   O = Open Space  S    OAWWWTO   A = Attacker                 T = Target 

Does the target have total cover from the attacker?

The following quote has the relevant rules:

To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target’s square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC).

[…]

Total Cover: If you don’t have line of effect to your target (that is, you cannot draw any line from your square to your target’s square without crossing a solid barrier), he is considered to have total cover from you. You can’t make an attack against a target that has total cover.

Source: Core Rulebook pg.195-196

My interpretation:

  • Every corner of the attacker’s square has at least one line to one of the target’s square’s corners passing through the wall. The target has cover.
  • A line can be traced from either of the northern corners of the attacker to either of the northern corners of the target. This line runs parallel to the wall but does cross it. The target does not have total cover.

Is this interpretation of the rules correct?

Representing increase/decrease at glance on “opposite” labels?

I’m building the front-view of a marketing Ad fraud analysis tool that wants shows users how much ad fraud vs valid traffic they get.

It already does this, and the purpose is to show at a glance in a clearer, faster manner.

The issue: an increase or decrease of “fraud” and “valid” traffic will be opposite in meaning for each label. Here is an example where it gets confusing:

enter image description here

Notice Total, Valid and Ad Fraud rows. Users will see Valid/Total traffic increase as positive, and Fraud increase as negative. I’m concerned for clarity, has anyone dealt with this situation?

Best options seem to be:

  1. Removing the increase/decrease relationships, but it seems to lose the ease of understanding at glance.
  2. Only display the relationship for ad fraud; ad fraud analysis is the main use for our users.
  3. Something else?

If the opposite angles of inscribed quadrilateral will be always supplementary, where did I lose the train of thoughts in this example?

I embedded this diagram to make easier the understanding of my question.

Starting with the quadrilateral ABCD, the central angle ABC that subtends the arch formed by the inscribed angle X, according to the “Inscribed Angle Theorem”, should be exactly twice the value of X. Hence, we could consider the central angle of the arch AEC equal to 360° – 2x.

Changing a bit the perspective, if we consider the angle ADC the inscribed angle that subtends the arch AEC, and so the angle ADC should be equal to half of the angle AEC also according to the “Inscribed Angle Theorem”. Then we get that the value of angle ADC is equal to 180 – x.

Corroborating with this assumption, the double of the inscribed angle of the arch AEC plus the double of the inscribed angle of the arch AC should totalize 360°. And in fact, considering the double of the last found angle, ADC, plus the double of the angle AEC, we reach a total of 360°.

Now my question. The opposite sides of an inscribed quadrilateral should sum up 180°. When I add 180 – x to 2x, this results in 180° + x. Therefore, the value of x should be equal to 0°, which doesn’t make sense.

Where did I lose the train of thought!?

Thanks in advance 🙂

Arriving at the same result with the opposite hypotheses

I am pretty distant from anything analytic, including analytic number theory but I decided to read the Wikipedia page on the Riemann hypothesis and there is some pretty interesting stuff there:

Some consequences of the RH are also consequences of its negation, and are thus theorems. In their discussion of the Hecke, Deuring, Mordell, Heilbronn theorem, (Ireland & Rosen 1990, p. 359) say

The method of proof here is truly amazing. If the generalized Riemann hypothesis is true, then the theorem is true. If the generalized Riemann hypothesis is false, then the theorem is true. Thus, the theorem is true!!

What is surprising is that both a statement and its negation are useful for proving the same theorem.

Do similar situations arise with other major, notorious conjectures in mathematics? I only care about algebraic geometry and algebraic number theory for the most part but I guess it will make little sense to have such questions devoted to each area of mathematics so post whatever you’ve got.

To give an initial direction: are there any interesting statements one can prove assuming both some hard conjecture about motives (e.g. motivic $ t$ -structure, the standard conjectures, Hodge/Tate conjectures) and its negation?

What is the opposite of a “priming read”? [on hold]

This is a simple terminology question about a primitive loop design pattern.

Some looping constructs require a priming read before entering the loop… Whereas other looping constructs require one final write (or the like) after exiting the loop… It seems to me that such a “trailing write” is analogous to the opposite of a priming read.

So what is the proper term for such a piece of code?



EDIT:

Ok guys, this is getting annoying. If you’ve never even heard the term “priming read” (or the like) in the first place, then don’t suggest other random terminology that already has a well-established definition (e.g. “loop unrolling”).

My question is whether there is a canonical (even if esoteric) term for this loop design pattern. Or if not, if there is a semi-widely-used but specific term for it. Things like “loop transformation” or “pre-loop” and “post-loop” are not specific enough to accurately differentiate this particular loop design pattern from more general loop patterns, resource acquisition / clean-up code, etc.



Example

Here is the (simplified) C++ code snippet that motivated my question:

auto structure = structures.begin();  // structures is of type vector<structure>  // "Priming read" for the loop size_t prevID = structure->ID; int aggregateDelta = structure->delta;  // The loop while (++structure != structures.end()) {     if (structure->ID == prevID) {         aggregateDelta += structure->delta;     }     else {         reducedStructures.push_back({prevID, aggregateDelta});         prevID = structure->ID;         aggregateDelta = structure->delta;     } }  // Opposite of a "priming read" for the loop reducedStructures.push_back({prevID, aggregateDelta}); 

Clarification

Based on the comments, there seems to be some confusion as to what exactly a “priming read” is in the first place and how it is different from some other concepts.

“Priming Read”

Given an unstructured loop, we may convert it to a structured loop by moving the first n statements of the loop body to the end of the loop body and duplicating those statements to outside of the loop before the loop test expression. The duplicated statements that are now before the loop entrance are what are called the “priming read.”

Unstructured Loop:

enter image description here

Structured Loop with “Priming Read”:

enter image description here

Note that given an unstructured loop that has statements between the loop entrance and the loop test expression, if we want to make it into a structured loop then the “priming read” is required for correctness. This is what makes it different from a generalized loop transformation (which appears to be what some commenters call “loop unrolling”).

Structured but Incorrect Loop without “Priming Read”:

enter image description here

“Loop Unrolling”

The movement and duplication of code involved in converting an unstructured loop into a structured loop with a “priming read” does not constitute loop unrolling, which refers specifically to a compiler optimization technique that duplicates all the code in the body of the loop for the sake of improving runtime by reducing loop control overhead. “Loop unrolling” has nothing to do with structured / unstructured programming, and it is not required for loop correctness.

Fully “Rolled” Loop Body:

enter image description here

“Unrolled” Loop Body by a factor of 4:

enter image description here