Strict WQOs and Strict WPOs

The Wikipedia article on WQOs does not mention a strict version. I came across a particular relation, which I could only describe as a strict WQO, but I am wondering if my reasoning is correct and if the notion of a “strict WQO” even makes sense (I think it does).

Consider the set $ X \times \mathbb{N}$ where $ X = \{1,\ldots,k\}$ for some integer $ k$ and $ \mathbb{N}$ denotes the set of natural numbers. We define the relation $ \prec$ as: $ $ (x_1,n_1) \prec (x_2,n_2) \quad \text{iff} \quad (x_1 \leq x_2) \wedge (n_1 < n_2) $ $

Strict Quasi Order: Clearly $ \prec$ is irreflexive and transitive, and therefore a strict quasi order.

No Infinite Antichains: It’s also easy to observe that there are no infinite antichains. Due to the Pigeonhole principle, any sequence $ (x_1,n_1), (x_2,n_2), \ldots$ of length $ \geq k$ must have at least one pair $ \langle (x_i,n_i),(x_j,n_j)\rangle$ such that $ x_i = x_j$ . Then, since either $ n_i < n_j$ or $ n_j < n_i$ must hold, we have at least one pair in the sequence on which $ \prec$ holds.

Well-Foundedness: Finally, we show that there are no infinite descending chains. For any element $ (i,j)$ , there are only $ |\{1,\ldots,i\} \times \{1,\ldots,(j-1)\}| = i(j-1)$ elements that can precede $ (i,j)$ .

Is this reasoning correct? Then is $ \prec$ a strict WQO on $ X \times \mathbb{N}$ ?

More questions: Since antisymmetry is implied by irreflexivity and transitivity, is any strict quasi order also a strict partial order? And so is any strict WQO also a strict WPO?


Does this overly strict reading of Two-Weapon Fighting Work?

Two-Weapon fighting states:

“When you take the Attack action and Attack with a light melee weapon that you’re holding in one hand, you can use a Bonus Action to Attack with a different light melee weapon that you’re holding in the other hand.” Emphasis mine

There have already been some questions regarding when you have to actually be wielding the light weapons required for Two-Weapon Fighting. Here and Here.

And to satisfies any of those, say the following scenario occurs:

It is Alice’s turn, and she starts her turn wielding two light melee weapons, say, two daggers.

She makes an opportunity attack against a creature using one of these weapons (this is possible, for example, if a creature had used the ready action to move).

She drops one of her daggers (a free action), then takes the attack action and as part of the attack she draws a non-light weapon, say, a quarterstaff, and finally she attacks using this quarterstaff.

Is there any reason, RAW, that she would not be able to use her bonus action to attack with the other dagger which she is still holding because she has technically fulfilled both requirements of Two-Weapon Fighting: “taking the attack action” and “attacking with a light melee weapon…”?

Prove that the upper bound in the Noiseless-coding theorem is strict

Given a probability distribution $ p$ across an alphabet, we define redundancy as:

Expected Length of codewords – entropy of p = $ \ E(S) – h(p)$

Prove that for each $ \epsilon$ with $ 0 \le \epsilon \lt 1$ there exists a $ p$ such that the optimal encoding has redundancy $ \epsilon$ .


I have tried constructing a probability distribution like $ p_o = \epsilon, p_1 = 1 – \epsilon $ based on a previous answer, but I can’t get it to work.

Any help would be much appreciated.

Strict Convexity and Uniqueness of Dual norm

So, I have trouble proving the following, I’d be grateful if somebody helps me with this.

Let $ z$ be a given point in $ \mathbb{R}^m$ . Then, $ x\in \mathbb{R}^m$ is a dual vector of $ z$ with respect to $ \|.\|$ if it satisfies $ \|x\|=1$ and $ z^Tx=\|z\|’$ .
A norm $ \|.\|$ is said to be strictly convex if the unit sphere $ \{x:\|x\|=1\}$ contains no line segment.

Now, how does one prove that

The norm $ \|.\|$ is strictly convex if and only if each $ z\in \mathbb{R}^m$ has a unique dual vector.

Does this strict reading allow both Extra attack and Thirsthing blade to be used together?

The warlock invocation Thirsting Blade cannot be normally used with the class feature Extra attack since both feature explicitly say attack twice instead of once. But it seems to me that you could use both features when using two weapon fighting.

Assuming two light weapons, one of which is your pact weapon. You take the Attack action on your turn to attack twice with your non-pact weapon using you Extra Attack class feature.

Then, given the two fighting rules, you use your bonus action to attack once using your pact weapon this time.

Two weapon fighting rules (PHB p.195):

When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand.

But since your have the Thirsting Blade invocation, and you used the Attack action, you get to attack twice with your pact weapon.

Thirsting Blade (PHB p.111):

Vou can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn.

Does this combo work or is there any interaction I’m not aware of ?

Youtube Strict vs. Moderate Access Considerations

I am considering implementing YouTube restrictions via G Suite. The wording on what exactly Moderate vs. Restrictive access does is very vague. I was wondering what expectations users should have for their YouTube experience at either setting. We currently have a firewall-based solution to prevent pornography from showing up but that is all at this time.

Strict Positivity of Indexed Datatype in Agda

Agda is ruling out definitions like

data Bad : Set where  bad : (Bad → Bad) → Bad 

Because “Non strictly-positive declarations are rejected because one can write a non-terminating function using them.” (as one may read in Agda wiki). I know also that disabling strict positivity checking allows constructing inhabitant of empty type.

But Agda also complains about definition like this:

  data Bad? : ℕ → Set where     badZ : Bad? zero     badS : ∀ {n} → (Bad? n → Bad? n) → Bad? (suc n) 

telling me that:

Bad? is not strictly positive, because it occurs to the left of an arrow in the type of the constructor badS in the definition of Bad?. 

What i know is that i can create valid definition without inductive datatypes:

  Bad?′ : ℕ → Set   Bad?′ zero = Unit   Bad?′ (suc n) = (Bad?′ n) → (Bad?′ n)     badZ′ : Bad?′ zero   badZ′ = tt    badS′ : ∀ {n} → (Bad?′ n → Bad?′ n) → Bad?′ (suc n)   badS′ x = x 

My question is:

Can “Bad?” datatype lead to similar inconsistencies, and this is the reason why it is rejected by Agda?

Or is it the case that positivity checking in Agda is too “cautious”, and can’t figure out that indexing is making it strict positive?

How strict should I be in rejecting unexpected query parameters?

TL;DR Is it a “best practice” to return an HTTP 400 Bad Request response if extra parameters are sent with a request?

I’m putting together a web app and doings some testing with OWASP ZAP. I’m pretty happy with the results – the errors I get seem to be all low confidence and when I inspect the errors in detail, I’m finding that the ZAP tool really didn’t change anything with the request. But that leads me to a “higher level” question, which is best explained with an example:

OWASP ZAP allegedly found an SQL injection with the following URL: 

in “human-readable” form, that is:' AND '1'='1' -- 

Looks like a pretty standard SQL injection attack. Now, this endpoint is intended to return a client object in JSON form, and that’s what this request does through OWASP ZAP. The server returned exactly what was expected, the client with ID=1. I’m doing everything that the OWASP ZAP docs recommend with respect to SQL injections, so what more should I do?

It occurs to me that I just don’t know what OWASP ZAP expects to receive in response to this kind of attack – an error reponse, perhaps? The docs are helpful, in a “this is how to interface with the database” kind of way, but it’s not clear to me if I need to respond with an error.

Should I return a 400 Bad Request error if inappropriate query parameters are provided?

Does HTTP:// to HTTPS:// redirection means strict HTTPS from server

when I try to connect to some websites using http:// (notice the absence of s) , my client end up with https://.

I use python requests for this purpose, which simulate a client behavior. It performs the redirection and show me the final URL after redirection, if any.

Example: when I input the get requets end up at

Does this mean the website DOES NOT accept http:// requests?